Files
soorya-carpet/tests/Feature/DashboardTest.php
Chief-spartan-117 2162084b95
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
INit
2025-09-28 19:55:43 +05:45

25 lines
541 B
PHP

<?php
namespace Tests\Feature;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class DashboardTest extends TestCase
{
use RefreshDatabase;
public function test_guests_are_redirected_to_the_login_page()
{
$this->get(route('dashboard'))->assertRedirect(route('login'));
}
public function test_authenticated_users_can_visit_the_dashboard()
{
$this->actingAs($user = User::factory()->create());
$this->get(route('dashboard'))->assertOk();
}
}