fix(models): correct UserSetting import namespace and add test coverage

This commit is contained in:
2026-09-07 18:34:51 +02:00
parent 208efbb85d
commit 3502c3e85b
34 changed files with 2497 additions and 2 deletions
@@ -0,0 +1,30 @@
<?php
namespace Tests\Feature\Auth;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class EmailNotificationTest extends TestCase
{
use RefreshDatabase;
public function test_verified_user_is_redirected(): void
{
$user = User::factory()->create();
$this->actingAs($user)
->post(route('verification.send'))
->assertRedirect(route('dashboard', absolute: false));
}
public function test_unverified_user_gets_notification(): void
{
$user = User::factory()->unverified()->create();
$this->actingAs($user)
->post(route('verification.send'))
->assertSessionHas('status', 'verification-link-sent');
}
}