Fix tests

This commit is contained in:
James Cole 2018-05-12 16:04:46 +02:00
parent 5903133e3b
commit ccee7b483c
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 5 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class FileRoutine implements RoutineInterface
{
$this->importJob = $importJob;
$this->repository = app(ImportJobRepositoryInterface::class);
$this->repository->setUser($job->user);
$this->repository->setUser($importJob->user);
}
/**

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);