mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-15 12:53:26 +00:00
(add basic logout test and endpoint)
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user