Fix tests

This commit is contained in:
James Cole
2018-05-12 16:04:46 +02:00
parent 5903133e3b
commit ccee7b483c
2 changed files with 5 additions and 2 deletions

View File

@@ -370,7 +370,10 @@ class CategoryControllerTest extends TestCase
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->twice()->andReturn(TransactionJournal::first());
$month = new Carbon();
$month->startOfMonth();
$journal = TransactionJournal::where('date', '>=', $month->format('Y-m-d') . ' 00:00:00')->first();
$journalRepos->shouldReceive('firstNull')->twice()->andReturn($journal);
$accountRepos->shouldReceive('getAccountsByType')->andReturn(new Collection);