Fix tests.

This commit is contained in:
James Cole
2018-07-20 16:28:54 +02:00
parent 2d66a9212f
commit 49ff6febe5
14 changed files with 789 additions and 582 deletions

View File

@@ -40,7 +40,9 @@ class AddTagTest extends TestCase
public function testActExistingTag(): void
{
$tag = $this->user()->tags()->inRandomOrder()->whereNull('deleted_at')->first();
/** @var TransactionJournal $journal */
$journal = $this->user()->transactionJournals()->inRandomOrder()->whereNull('deleted_at')->first();
$journal->tags()->sync([]);
$journal->tags()->sync([$tag->id]);
$this->assertDatabaseHas('tag_transaction_journal', ['tag_id' => $tag->id, 'transaction_journal_id' => $journal->id]);
$ruleAction = new RuleAction;