From 9ad8e1fc6b923dcd18603a4944335ee0bdcdd506 Mon Sep 17 00:00:00 2001 From: Dennis Elsinga Date: Wed, 30 Oct 2024 15:43:29 +0100 Subject: [PATCH] Refactor user logout test to use Filament helper methods --- tests/Feature/Filament/Pages/Auth/LoginTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Feature/Filament/Pages/Auth/LoginTest.php b/tests/Feature/Filament/Pages/Auth/LoginTest.php index 2eb18ce..5976b8c 100644 --- a/tests/Feature/Filament/Pages/Auth/LoginTest.php +++ b/tests/Feature/Filament/Pages/Auth/LoginTest.php @@ -38,9 +38,8 @@ }); test('an authenticated user can logout', function () { - $this->get('admin') - ->assertOk(); + $this->assertAuthenticated(); - $this->post('admin/logout') + $this->post(Filament::getLogoutUrl()) ->assertRedirect(Filament::getLoginUrl()); });