mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-03 12:47:17 -06:00
Fixed some tests.
This commit is contained in:
parent
199f348ff4
commit
0e068d4ccf
@ -50,6 +50,7 @@ class ConnectJournalToPiggyBankTest extends TestCase
|
||||
$this->be($user);
|
||||
|
||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||
/** @var \FireflyIII\Models\PiggyBank $piggyBank */
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
$account1 = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
$account2 = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||
@ -60,6 +61,13 @@ class ConnectJournalToPiggyBankTest extends TestCase
|
||||
$account2->save();
|
||||
$piggyBank->save();
|
||||
|
||||
// because the event handler responds to this piggy bank, we must remove
|
||||
// the piggy bank repetition:
|
||||
/** @var \FireflyIII\Models\PiggyBankRepetition $rep */
|
||||
foreach($piggyBank->piggyBankRepetitions()->get() as $rep) {
|
||||
$rep->forceDelete();
|
||||
}
|
||||
|
||||
Transaction::create(
|
||||
[
|
||||
'account_id' => $account1->id,
|
||||
|
Loading…
Reference in New Issue
Block a user