Initial commit of the L'Ami Fiduciaire SaaS platform built on Laravel 12, Vue 3, Inertia.js 2, and Tailwind CSS 4. Story 0.1 (rename folders to declarations in database) is implemented and code-reviewed: migration, rollback, and 6 Pest tests all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
758 B
PHP
29 lines
758 B
PHP
<?php
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Notifications\VerifyEmail;
|
|
use Illuminate\Support\Facades\Notification;
|
|
|
|
test('sends verification notification', function () {
|
|
Notification::fake();
|
|
|
|
$user = User::factory()->unverified()->create();
|
|
|
|
$this->actingAs($user)
|
|
->post(route('verification.send'))
|
|
->assertRedirect(route('home'));
|
|
|
|
Notification::assertSentTo($user, VerifyEmail::class);
|
|
});
|
|
|
|
test('does not send verification notification if email is verified', function () {
|
|
Notification::fake();
|
|
|
|
$user = User::factory()->create();
|
|
|
|
$this->actingAs($user)
|
|
->post(route('verification.send'))
|
|
->assertRedirect(route('dashboard', absolute: false));
|
|
|
|
Notification::assertNothingSent();
|
|
}); |