Fix tests.

This commit is contained in:
James Cole
2018-08-17 06:45:57 +02:00
parent df0e2dd2a2
commit f319005357
11 changed files with 46 additions and 70 deletions

View File

@@ -564,6 +564,7 @@ class ReportControllerTest extends TestCase
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
$tagRepos = $this->mock(TagRepositoryInterface::class);
/** @var Tag $tag */
$tag = $this->user()->tags()->find(1);
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
$accountRepos->shouldReceive('findNull')->andReturn($this->user()->accounts()->find(1))->twice();
@@ -579,7 +580,7 @@ class ReportControllerTest extends TestCase
$this->be($this->user());
$response = $this->post(route('reports.index.post'), $data);
$response->assertStatus(302);
$response->assertRedirect(route('reports.report.tag', ['1', $tag->tag, '20160101', '20160131']));
$response->assertRedirect(route('reports.report.tag', ['1', $tag->id, '20160101', '20160131']));
}
/**