make sure randomly selected journals match prerequisites.

This commit is contained in:
James Cole
2018-03-02 17:07:32 +01:00
parent 139c2284b8
commit 36113f84be
80 changed files with 728 additions and 281 deletions

View File

@@ -549,7 +549,7 @@ class ReportControllerTest extends TestCase
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
$tagRepos = $this->mock(TagRepositoryInterface::class);
$tag = $this->user()->tags()->find(1);
$tag = $this->user()->tags()->find(1);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$accountRepos->shouldReceive('findNull')->andReturn($this->user()->accounts()->find(1))->twice();
$tagRepos->shouldReceive('findByTag')->andReturn($tag)->twice();
@@ -603,7 +603,7 @@ class ReportControllerTest extends TestCase
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
$tagRepos = $this->mock(TagRepositoryInterface::class);
$generator = $this->mock(TYRG::class);
$tag = $this->user()->tags()->find(1);
$tag = $this->user()->tags()->find(1);
$tagRepos->shouldReceive('setUser');
$tagRepos->shouldReceive('get')->andReturn(new Collection([$tag]));