Improve test coverage.

This commit is contained in:
James Cole
2019-08-01 06:21:44 +02:00
parent 9b574ce7ad
commit b049ca27f1
45 changed files with 336 additions and 251 deletions

View File

@@ -38,7 +38,7 @@ class HasNoBudgetTest extends TestCase
public function testTriggeredBudget(): void
{
$journal = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 1)->whereNull('deleted_at')->first();
$budget = $journal->user->budgets()->first();
$budget = $this->getRandomBudget();
$journal->budgets()->detach();
$journal->budgets()->save($budget);
$this->assertEquals(1, $journal->budgets()->count());