forge/tests/Feature/User/BrowserSessionsTest.php

17 lines
439 B
PHP
Raw Permalink Normal View History

2024-07-18 00:11:32 -04:00
<?php
2025-01-30 00:23:55 -05:00
declare(strict_types=1);
2024-07-18 00:11:32 -04:00
use App\Models\User;
use Laravel\Jetstream\Http\Livewire\LogoutOtherBrowserSessionsForm;
use Livewire\Livewire;
2025-01-30 00:23:55 -05:00
test('other browser sessions can be logged out', function (): void {
2024-07-18 00:11:32 -04:00
$this->actingAs(User::factory()->create());
Livewire::test(LogoutOtherBrowserSessionsForm::class)
->set('password', 'password')
->call('logoutOtherBrowserSessions')
->assertSuccessful();
});