be(new FireflyIII\User); $this->call('POST', '/daterange', ['end' => $end, 'start' => $start,'_token' => 'replaceme']); $this->assertResponseOk(); $this->assertSessionHas('start'); $this->assertSessionHas('end'); $this->assertSessionHas('warning'); } /** * @covers FireflyIII\Http\Controllers\HomeController::dateRange */ public function testDateRange() { $start = '2015-03-01'; $end = '2015-03-31'; $this->be(new FireflyIII\User); $this->call('POST', '/daterange', ['end' => $end, 'start' => $start,'_token' => 'replaceme']); $this->assertResponseOk(); $this->assertSessionHas('start'); $this->assertSessionHas('end'); } /** * @covers FireflyIII\Http\Controllers\HomeController::index */ public function testIndexLoggedIn() { $this->be(new FireflyIII\User); Amount::shouldReceive('getCurrencyCode')->andReturn('EUR'); $response = $this->call('GET', '/'); $this->assertResponseOk(); } /** * @covers FireflyIII\Http\Controllers\HomeController::index */ public function testIndexNoLogin() { $response = $this->call('GET', '/'); $this->assertRedirectedTo('auth/login'); } }