Improve tests for transaction rules.

This commit is contained in:
James Cole
2018-03-04 16:42:29 +01:00
parent 04b8552d27
commit d22fb9f438
5 changed files with 35 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ class ClearCategoryTest extends TestCase
// associate budget with journal:
$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();
$category = $journal->user->categories()->first();
$journal->budgets()->save($category);
$journal->categories()->save($category);
$this->assertGreaterThan(0, $journal->categories()->count());
// fire the action: