Files
Reseaux-de-neurones-artific…/tests/Feature/DashboardTest.php
Matthias Guillitte 650cf56045
Some checks failed
linter / quality (push) Failing after 6m40s
tests / ci (8.4) (push) Failing after 10s
tests / ci (8.5) (push) Failing after 11s
git init
2026-03-03 11:10:38 +01:00

28 lines
618 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()
{
$response = $this->get(route('dashboard'));
$response->assertRedirect(route('login'));
}
public function test_authenticated_users_can_visit_the_dashboard()
{
$user = User::factory()->create();
$this->actingAs($user);
$response = $this->get(route('dashboard'));
$response->assertOk();
}
}