mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-23 09:26:29 -06:00
First attempt at testing the home controller.
This commit is contained in:
parent
2f8e3a0707
commit
0baf8f6d18
@ -25,8 +25,9 @@ class HomeControllerTest extends TestCase
|
||||
*/
|
||||
public function testFlush()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
$response = $this->call('GET', '/flush');
|
||||
$this->assertRedirectedToRoute('index');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -37,11 +38,27 @@ class HomeControllerTest extends TestCase
|
||||
{
|
||||
$this->be(new User(['email' => 'test@example.com']));
|
||||
|
||||
|
||||
$response = $this->call('GET', '/');
|
||||
$this->assertResponseOk();
|
||||
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
/**
|
||||
* @covers HomeController::index
|
||||
* @todo Implement testIndex().
|
||||
*/
|
||||
public function testIndexWithAccounts()
|
||||
{
|
||||
$user = new User(['email' => 'test@example.com']);
|
||||
$this->be($user);
|
||||
|
||||
$pref = new Preference(['user_id' => $user->id,'name' => 'frontpageAccounts', 'data' => [1]]);
|
||||
$pref->save();
|
||||
|
||||
$response = $this->call('GET', '/');
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers HomeController::rangeJump
|
||||
|
Loading…
Reference in New Issue
Block a user