diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 85d21bca32..26051e16d0 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -37,7 +37,7 @@ class AccountController extends Controller */ public function create($what = 'asset') { - $subTitleIcon = Config::get('firefly.subTitlesByIdentifier.' . $what); + $subTitleIcon = Config::get('firefly.subIconsByIdentifier.' . $what); $subTitle = 'Create a new ' . e($what) . ' account'; return view('accounts.create', compact('subTitleIcon', 'what', 'subTitle')); diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 14476ea8e3..b44db645be 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -1,11 +1,9 @@ be(FireflyIII\User::whereEmail('thegrumpydictator@gmail.com')->first()); + + + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + public function tearDown() + { + parent::tearDown(); + } + + + public function testCreate() + { + $response = $this->call('GET', '/accounts/create/asset'); + $this->assertResponseOk(); + $this->assertViewHas('subTitle', 'Create a new asset account'); + $this->assertViewHas('subTitleIcon', 'fa-money'); + $this->assertViewHas('what', 'asset'); + + } + + public function testDelete() + { + $this->markTestIncomplete(); + } + + public function testDestroy() + { + $this->markTestIncomplete(); + } + + public function testEdit() + { + $this->markTestIncomplete(); + } + + public function testIndex() + { + $this->markTestIncomplete(); + } + + public function testShow() + { + $this->markTestIncomplete(); + } + + public function testStore() + { + $this->markTestIncomplete(); + } + + public function testUpdate() + { + $this->markTestIncomplete(); + } + +} diff --git a/tests/controllers/HomeControllerTest.php b/tests/controllers/HomeControllerTest.php index df7d4dba6f..f0610c2fcd 100644 --- a/tests/controllers/HomeControllerTest.php +++ b/tests/controllers/HomeControllerTest.php @@ -34,7 +34,7 @@ class HomeControllerTest extends TestCase $start = '2014-03-01'; $end = '2015-03-31'; - $this->be(new FireflyIII\User); + $this->be(FireflyIII\User::whereEmail('thegrumpydictator@gmail.com')->first()); $this->call('POST', '/daterange', ['end' => $end, 'start' => $start,'_token' => 'replaceme']); $this->assertResponseOk(); @@ -52,7 +52,7 @@ class HomeControllerTest extends TestCase $start = '2015-03-01'; $end = '2015-03-31'; - $this->be(new FireflyIII\User); + $this->be(FireflyIII\User::whereEmail('thegrumpydictator@gmail.com')->first()); $this->call('POST', '/daterange', ['end' => $end, 'start' => $start,'_token' => 'replaceme']); $this->assertResponseOk(); @@ -66,7 +66,7 @@ class HomeControllerTest extends TestCase */ public function testIndexLoggedIn() { - $this->be(new FireflyIII\User); + $this->be(FireflyIII\User::whereEmail('thegrumpydictator@gmail.com')->first()); $response = $this->call('GET', '/'); $this->assertResponseOk();