tests/Feature/MmexClient/AccountTest.php 1 location
|
@@ 9-21 (lines=13) @@
|
6 |
|
|
7 |
|
class AccountTest extends MmexTestCase |
8 |
|
{ |
9 |
|
public function testDeleteAllAccounts() |
10 |
|
{ |
11 |
|
// Arrange |
12 |
|
$account = factory(Account::class)->create(['user_id' => $this->user->id]); |
13 |
|
$url = $this->buildUrl(['delete_bankaccount' => 'true']); |
14 |
|
|
15 |
|
// Act |
16 |
|
$response = $this->get($url); |
17 |
|
|
18 |
|
// Assert |
19 |
|
$this->assertSeeMmexSuccess($response); |
20 |
|
$this->assertDatabaseMissing('accounts', ['user_id' => $this->user->id, 'name' => $account->name]); |
21 |
|
} |
22 |
|
|
23 |
|
public function testImportAccounts() |
24 |
|
{ |
tests/Feature/MmexClient/CategoryTest.php 1 location
|
@@ 10-23 (lines=14) @@
|
7 |
|
|
8 |
|
class CategoryTest extends MmexTestCase |
9 |
|
{ |
10 |
|
public function testDeleteAllCategories() |
11 |
|
{ |
12 |
|
// Arrange |
13 |
|
$categorie = factory(Category::class)->create(['user_id' => $this->user->id]); |
14 |
|
|
15 |
|
$url = $this->buildUrl(['delete_category' => 'true']); |
16 |
|
|
17 |
|
// Act |
18 |
|
$response = $this->get($url); |
19 |
|
|
20 |
|
// Assert |
21 |
|
$this->assertSeeMmexSuccess($response); |
22 |
|
$this->assertIsSoftDeletedInDatabase('categories', ['user_id' => $this->user->id, 'name' => $categorie->name]); |
23 |
|
} |
24 |
|
|
25 |
|
public function testImportCategories() |
26 |
|
{ |
tests/Feature/MmexClient/PayeeTest.php 1 location
|
@@ 10-22 (lines=13) @@
|
7 |
|
|
8 |
|
class PayeeTest extends MmexTestCase |
9 |
|
{ |
10 |
|
public function testDeleteAllPayees() |
11 |
|
{ |
12 |
|
// Arrange |
13 |
|
$payee = factory(Payee::class)->create(['user_id' => $this->user->id]); |
14 |
|
$url = $this->buildUrl(['delete_payee' => 'true']); |
15 |
|
|
16 |
|
// Act |
17 |
|
$response = $this->get($url); |
18 |
|
|
19 |
|
// Assert |
20 |
|
$this->assertSeeMmexSuccess($response); |
21 |
|
$this->assertIsSoftDeletedInDatabase('payees', ['user_id' => $this->user->id, 'name' => $payee->name]); |
22 |
|
} |
23 |
|
|
24 |
|
public function testImportPayees() |
25 |
|
{ |
tests/Feature/MmexClient/TransactionTest.php 1 location
|
@@ 32-44 (lines=13) @@
|
29 |
|
$this->assertEquals($response->getContent(), ''); |
30 |
|
} |
31 |
|
|
32 |
|
public function testDeleteTransactions() |
33 |
|
{ |
34 |
|
// Arrange |
35 |
|
$transaction = factory(Transaction::class)->create(['user_id' => $this->user->id]); |
36 |
|
$url = $this->buildUrl(['delete_group' => $transaction->id]); |
37 |
|
|
38 |
|
// Act |
39 |
|
$response = $this->get($url); |
40 |
|
|
41 |
|
// Assert |
42 |
|
$this->assertSeeMmexSuccess($response); |
43 |
|
$this->assertIsSoftDeletedInDatabase('transactions', ['user_id' => $this->user->id, 'id' => $transaction->id]); // must not be deleted! just soft deleted. |
44 |
|
} |
45 |
|
|
46 |
|
public function testDownloadTransactions() |
47 |
|
{ |