be($this->user()); $args = [ 'start' => '2012-01-01', 'end' => '2012-04-01', ]; $this->call('POST', route('daterange'), $args); $this->assertResponseStatus(200); $this->assertSessionHas('warning', '91 days of data may take a while to load.'); } /** * @covers FireflyIII\Http\Controllers\HomeController::displayError */ public function testDisplayError() { $this->be($this->user()); $this->call('GET', route('error')); $this->assertResponseStatus(500); } /** * @covers FireflyIII\Http\Controllers\HomeController::flush */ public function testFlush() { $this->be($this->user()); $this->call('GET', route('flush')); $this->assertResponseStatus(302); } /** * @covers FireflyIII\Http\Controllers\HomeController::index * @covers FireflyIII\Http\Controllers\Controller::__construct * @dataProvider dateRangeProvider * * @param $range */ public function testIndex(string $range) { $this->be($this->user()); $this->changeDateRange($this->user(), $range); $this->call('GET', route('index')); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\HomeController::routes * @dataProvider dateRangeProvider * * @param string $range */ public function testRoutes(string $range) { $this->be($this->user()); $this->changeDateRange($this->user(), $range); $this->call('GET', route('all-routes')); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\HomeController::testFlash */ public function testTestFlash() { $this->be($this->user()); $this->call('GET', route('test-flash')); $this->assertResponseStatus(302); $this->assertSessionHas('success'); $this->assertSessionHas('info'); $this->assertSessionHas('warning'); $this->assertSessionHas('error'); } }