@@ 19-29 (lines=11) @@ | ||
16 | ||
17 | class MmexControllerTest extends AbstractApiTestCase |
|
18 | { |
|
19 | public function testDeleteAllPayees() |
|
20 | { |
|
21 | // Arrange |
|
22 | $payee = factory(Payee::class)->create(); |
|
23 | $url = $this->buildUrl('', ['delete_payee' => 'true']); |
|
24 | ||
25 | //Assert |
|
26 | $this->get($url) |
|
27 | ->seeSuccess() |
|
28 | ->dontSeeInDatabase('payees', ['name' => $payee->name]); |
|
29 | } |
|
30 | ||
31 | public function testImportPayees() |
|
32 | { |
|
@@ 51-62 (lines=12) @@ | ||
48 | ->seeInDatabase('payees', ["name" => "Spotify", "last_category_id" => $billsServices->id]); |
|
49 | } |
|
50 | ||
51 | public function testDeleteAllAccounts() |
|
52 | { |
|
53 | // Arrange |
|
54 | $account = factory(Account::class)->create(); |
|
55 | ||
56 | $url = $this->buildUrl("", ["delete_bankaccount" => "true"]); |
|
57 | ||
58 | //Assert |
|
59 | $this->get($url) |
|
60 | ->seeSuccess() |
|
61 | ->dontSeeInDatabase('accounts', ["name" => $account->name]); |
|
62 | } |
|
63 | ||
64 | public function testImportAccounts() |
|
65 | { |
|
@@ 77-88 (lines=12) @@ | ||
74 | ->seeInDatabase('accounts', ['name' => 'Private Account']); |
|
75 | } |
|
76 | ||
77 | public function testDeleteAllCategories() |
|
78 | { |
|
79 | // Arrange |
|
80 | $categorie = factory(Category::class)->create(); |
|
81 | ||
82 | $url = $this->buildUrl('', ['delete_category' => 'true']); |
|
83 | ||
84 | //Assert |
|
85 | $this->get($url) |
|
86 | ->seeSuccess() |
|
87 | ->dontSeeInDatabase('categories', ['name' => $categorie->name]); |
|
88 | } |
|
89 | ||
90 | public function testImportCategories() |
|
91 | { |