Expand test coverage.

This commit is contained in:
James Cole
2018-01-24 11:09:21 +01:00
parent 602b35d589
commit 9a2c6c2967
4 changed files with 48 additions and 9 deletions

View File

@@ -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