mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Fix tests.
This commit is contained in:
@@ -112,10 +112,12 @@ class HelpControllerTest extends TestCase
|
||||
$help->shouldReceive('inCache')->withArgs(['index', 'en_US'])->andReturn(false)->once();
|
||||
$help->shouldReceive('getFromGithub')->withArgs(['index', 'en_US'])->andReturn('')->once();
|
||||
|
||||
$help->shouldReceive('putInCache')->once();
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('help.show', ['index']));
|
||||
$response->assertStatus(200);
|
||||
$response->assertSee('Er is geen hulptekst voor deze pagina.'); // Dutch
|
||||
$response->assertSee('Deze helptekst is nog niet beschikbaar in het Nederlands.'); // Dutch
|
||||
|
||||
// put English back:
|
||||
Preference::where('user_id', $this->user()->id)->where('name', 'language')->delete();
|
||||
|
@@ -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']));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user