expand tests

This commit is contained in:
James Cole
2016-02-04 07:30:48 +01:00
parent fb119cc208
commit 3690a53dc9
28 changed files with 432 additions and 325 deletions

View File

@@ -16,25 +16,32 @@ class PreferencesControllerTest extends TestCase
/**
* @covers FireflyIII\Http\Controllers\PreferencesController::index
* @todo Implement testIndex().
* @covers FireflyIII\Http\Controllers\PreferencesController::__construct
*/
public function testIndex()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('GET', '/preferences');
$this->assertResponseStatus(200);
}
/**
* @covers FireflyIII\Http\Controllers\PreferencesController::postIndex
* @todo Implement testPostIndex().
*/
public function testPostIndex()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$args = [
'frontPageAccounts' => [1],
'viewRange' => '1M',
'budgetMaximum' => 100,
'customFiscalYear' => 1,
'fiscalYearStart' => '01-01',
'language' => 'en_US',
];
$this->be($this->user());
$this->call('POST', '/preferences', $args);
$this->assertResponseStatus(302);
$this->assertSessionHas('success');
}
}