Fixed tests.

This commit is contained in:
James Cole
2015-05-26 19:38:52 +02:00
parent 2d2f18e538
commit 7dfde51b84
14 changed files with 282 additions and 443 deletions

View File

@@ -61,23 +61,6 @@ class ConnectJournalToPiggyBankTest extends TestCase
$rep->forceDelete();
}
Transaction::create(
[
'account_id' => $account1->id,
'transaction_journal_id' => $journal->id,
'amount' => 100
]
);
Transaction::create(
[
'account_id' => $account2->id,
'transaction_journal_id' => $journal->id,
'amount' => -100
]
);
// two transactions:
$event = new JournalCreated($journal, $piggyBank->id);
$class = new ConnectJournalToPiggyBank();
@@ -141,21 +124,6 @@ class ConnectJournalToPiggyBankTest extends TestCase
]
);
Transaction::create(
[
'account_id' => $account1->id,
'transaction_journal_id' => $journal->id,
'amount' => 100
]
);
Transaction::create(
[
'account_id' => $account2->id,
'transaction_journal_id' => $journal->id,
'amount' => -100
]
);
$event = new JournalCreated($journal, $piggyBank->id);
$class = new ConnectJournalToPiggyBank();
$result = $class->handle($event);
@@ -202,21 +170,6 @@ class ConnectJournalToPiggyBankTest extends TestCase
]
);
Transaction::create(
[
'account_id' => $account1->id,
'transaction_journal_id' => $journal->id,
'amount' => -100
]
);
Transaction::create(
[
'account_id' => $account2->id,
'transaction_journal_id' => $journal->id,
'amount' => 100
]
);
$event = new JournalCreated($journal, $piggyBank->id);
$class = new ConnectJournalToPiggyBank();
$result = $class->handle($event);