added it_logout_user test

This commit is contained in:
Peter Papp
2021-03-03 08:51:17 +01:00
parent cd9d1d91bd
commit b38f04533c
4 changed files with 14 additions and 26 deletions

View File

@@ -70,4 +70,18 @@ class AuthTest extends TestCase
'password' => 'secret',
])->assertStatus(200);
}
/**
* @test
*/
public function it_logout_user()
{
$user = User::factory(User::class)
->create();
Sanctum::actingAs($user);
$this->postJson('/logout')
->assertStatus(204);
}
}