Files
investbrain/tests/BrowserSessionsTest.php
T

25 lines
608 B
PHP
Raw Normal View History

2024-08-01 13:53:10 -05:00
<?php
2024-09-06 19:39:04 -05:00
namespace Tests;
2024-08-01 13:53:10 -05:00
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laravel\Jetstream\Http\Livewire\LogoutOtherBrowserSessionsForm;
use Livewire\Livewire;
use Tests\TestCase;
class BrowserSessionsTest extends TestCase
{
use RefreshDatabase;
public function test_other_browser_sessions_can_be_logged_out(): void
{
$this->actingAs(User::factory()->create());
Livewire::test(LogoutOtherBrowserSessionsForm::class)
->set('password', 'password')
->call('logoutOtherBrowserSessions')
->assertSuccessful();
}
}