be($this->user()); $this->call('GET', '/logout'); $this->assertResponseStatus(302); // index should now redirect: $this->call('GET', '/'); $this->assertResponseStatus(302); } /** * @covers FireflyIII\Http\Controllers\Auth\AuthController::login * @covers FireflyIII\Http\Controllers\Auth\AuthController::__construct * @covers FireflyIII\Http\Controllers\Auth\AuthController::sendFailedLoginResponse * @covers FireflyIII\Http\Controllers\Auth\AuthController::getFailedLoginMessage * */ public function testLogin() { $args = [ 'email' => 'thegrumpydictator@gmail.com', 'password' => 'james', 'remember' => 1, ]; $this->call('POST', '/login', $args); $this->assertResponseStatus(302); $this->call('GET', '/'); $this->assertResponseStatus(200); } /** * @covers FireflyIII\Http\Controllers\Auth\AuthController::register * @covers FireflyIII\Http\Controllers\Auth\AuthController::create * @covers FireflyIII\Http\Controllers\Auth\AuthController::isBlockedDomain * @covers FireflyIII\Http\Controllers\Auth\AuthController::getBlockedDomains * @covers FireflyIII\Http\Controllers\Auth\AuthController::validator */ public function testRegister() { $args = [ 'email' => 'thegrumpydictator+test@gmail.com', 'password' => 'james123', 'password_confirmation' => 'james123', ]; $this->call('POST', '/register', $args); $this->assertResponseStatus(302); $this->assertSessionHas('start'); } /** * @covers FireflyIII\Http\Controllers\Auth\AuthController::showRegistrationForm */ public function testShowRegistrationForm() { $this->call('GET', '/register'); $this->assertResponseStatus(200); } }