From 88f714999ee0b855e651fa4016caf924fbcd28a5 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 10 May 2015 08:53:49 +0200 Subject: [PATCH] Add test to get full coverage. --- tests/controllers/TagControllerTest.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/controllers/TagControllerTest.php b/tests/controllers/TagControllerTest.php index 6b50ca1d91..1e6c65fad9 100644 --- a/tests/controllers/TagControllerTest.php +++ b/tests/controllers/TagControllerTest.php @@ -115,6 +115,28 @@ class TagControllerTest extends TestCase $this->assertResponseOk(); } + public function testMultipleDeposits() + { + $tag = FactoryMuffin::create('FireflyIII\Models\Tag'); + FactoryMuffin::create('FireflyIII\Models\TransactionType'); + $type = FactoryMuffin::create('FireflyIII\Models\TransactionType'); + + for ($i = 0; $i < 3; $i++) { + $journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal'); + $journal->transaction_type_id = $type->id; + $journal->save(); + $tag->transactionJournals()->save($journal); + } + + + $tag->tagMode = 'nothing'; + $tag->save(); + $this->be($tag->user); + + $this->call('GET', '/tags/edit/' . $tag->id); + $this->assertResponseOk(); + } + public function testHideTagHelp() {