Signiere Bestätigung und Ausgaben über den Pfad, damit der Port die Links nicht ungültig macht.
Deploy Test / test (push) Successful in 11s
Deploy Test / deploy (push) Successful in 21s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-15 09:21:30 +01:00
1 parent 2113378e81
commit 63f2be565f
8 files changed
+69 -10

No files matched your search

+9 -3
View File
@@ -3,8 +3,8 @@
namespace Tests\Feature;
use App\Models\User;
use App\Notifications\VerifyEmailAddress;
use Illuminate\Auth\Notifications\ResetPassword;
use Illuminate\Auth\Notifications\VerifyEmail;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Notification;
use Tests\TestCase;
@@ -47,7 +47,7 @@ public function test_registration_creates_a_person_and_sends_verification(): voi
$this->assertSame('person', $user->party->type->value);
$this->assertSame('private', $user->party->profile->visibility['display_name']);
$this->assertAuthenticatedAs($user);
Notification::assertSentTo($user, VerifyEmail::class);
Notification::assertSentTo($user, VerifyEmailAddress::class);
}
public function test_placeholder_app_url_uses_the_address_opened_in_the_browser(): void
@@ -66,8 +66,14 @@ public function test_placeholder_app_url_uses_the_address_opened_in_the_browser(
$response->assertRedirect(url('/email/bestaetigen'));
$user = User::query()->where('email', 'probe@example.test')->firstOrFail();
Notification::assertSentTo($user, VerifyEmail::class, function (VerifyEmail $notification) use ($user): bool {
Notification::assertSentTo($user, VerifyEmailAddress::class, function (VerifyEmailAddress $notification) use ($user): bool {
$link = $notification->toMail($user)->actionUrl;
$path = parse_url($link, PHP_URL_PATH);
$query = parse_url($link, PHP_URL_QUERY);
$this->actingAs($user)
->get($path.'?'.$query)
->assertRedirect(route('member.dashboard'));
return str_starts_with($link, url('/email/bestaetigen/'))
&& ! str_contains($link, 'CHANGE-ME.example');