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