authentikate/tests/Feature/DashboardTest.php
Javier Feliz eeb6b4bc0e
Some checks failed
tests / ci (push) Waiting to run
linter / quality (push) Has been cancelled
Initial commit
2025-07-27 02:31:34 -04:00

15 lines
389 B
PHP

<?php
use App\Models\User;
uses(\Illuminate\Foundation\Testing\RefreshDatabase::class);
test('guests are redirected to the login page', function () {
$this->get('/dashboard')->assertRedirect('/login');
});
test('authenticated users can visit the dashboard', function () {
$this->actingAs($user = User::factory()->create());
$this->get('/dashboard')->assertStatus(200);
});