mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Code cleanup and tests.
This commit is contained in:
@@ -56,12 +56,9 @@ class HelpControllerTest extends TestCase
|
||||
$help->shouldReceive('getFromGithub')->withArgs(['index', 'nl_NL'])->andReturn('')->once();
|
||||
|
||||
// is US in cache?
|
||||
$help->shouldReceive('inCache')->withArgs(['index', 'en_US'])->andReturn(true)->twice();
|
||||
$help->shouldReceive('inCache')->withArgs(['index', 'en_US'])->andReturn(true)->once();
|
||||
$help->shouldReceive('getFromCache')->withArgs(['index', 'en_US'])->andReturn('US from cache.')->once();
|
||||
|
||||
// put US in cache:
|
||||
$help->shouldReceive('putInCache')->once();
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('help.show', ['index']));
|
||||
$response->assertStatus(200);
|
||||
@@ -87,12 +84,9 @@ class HelpControllerTest extends TestCase
|
||||
$help->shouldReceive('getFromGithub')->withArgs(['index', 'nl_NL'])->andReturn('')->once();
|
||||
|
||||
// is US in cache?
|
||||
$help->shouldReceive('inCache')->withArgs(['index', 'en_US'])->andReturn(false)->twice();
|
||||
$help->shouldReceive('inCache')->withArgs(['index', 'en_US'])->andReturn(false)->once();
|
||||
$help->shouldReceive('getFromGithub')->withArgs(['index', 'en_US'])->andReturn('')->once();
|
||||
|
||||
// put US in cache:
|
||||
$help->shouldReceive('putInCache')->once();
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('help.show', ['index']));
|
||||
$response->assertStatus(200);
|
||||
|
||||
Reference in New Issue
Block a user