(add basic logout test and endpoint)

This commit is contained in:
Adam Wathan
2017-05-18 11:48:22 -04:00
parent a852353292
commit 6b9b61fba2
4 changed files with 21 additions and 3 deletions

View File

@@ -69,4 +69,15 @@ class PromoterLoginTest extends TestCase
$this->assertFalse(session()->hasOldInput('password'));
$this->assertFalse(Auth::check());
}
/** @test */
function logging_out_the_current_user()
{
Auth::login(factory(User::class)->create());
$response = $this->post('/logout');
$response->assertRedirect('/login');
$this->assertFalse(Auth::check());
}
}