mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Expand test coverage.
This commit is contained in:
@@ -64,6 +64,26 @@ class AccountControllerTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::all
|
||||
*/
|
||||
public function testAllLongRange()
|
||||
{
|
||||
$generator = $this->mock(GeneratorInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
|
||||
$carbon = new Carbon;
|
||||
$carbon->subMonths(5);
|
||||
$accountRepos->shouldReceive('oldestJournalDate')->once()->andReturn($carbon);
|
||||
Steam::shouldReceive('balance')->andReturn('0');
|
||||
|
||||
$generator->shouldReceive('singleSet')->andReturn([]);
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('chart.account.all', [1]));
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseAccounts
|
||||
* @covers \FireflyIII\Generator\Chart\Basic\GeneratorInterface::singleSet
|
||||
|
||||
Reference in New Issue
Block a user