Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
First attempt at testing the home controller.
James Cole0baf8f6d1885
diff --git a/app/tests/HomeControllerTest.php b/app/tests/HomeControllerTest.phpindex 032ad2669c..86bf2218b4 100644--- a/app/tests/HomeControllerTest.php+++ b/app/tests/HomeControllerTest.php@@ -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' => '[email protected]']));+$response = $this->call('GET', '/');$this->assertResponseOk();$this->assertTrue(true);}+ /**+ * @covers HomeController::index+ * @todo Implement testIndex().+ */+ public function testIndexWithAccounts()+ {+ $user = new User(['email' => '[email protected]']);+ $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