laravel inertia

This commit is contained in:
Andras Bacsai committed 2025-04-01 16:53:52 +02:00
1 parent 9efe4b29b9
commit 414135f8a8
244 files changed
+23258

No files matched your search

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