Fix custom-domain test fixtures (public_id, bypass platform.session)
Deploy Ladill Events / deploy (push) Successful in 39s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
isaacclad
2026-06-26 17:06:27 +00:00
co-authored by Claude Opus 4.8
parent 8cca4fb6e3
commit 75bb72abb3
+3 -2
View File
@@ -31,7 +31,7 @@ class CustomDomainTest extends TestCase
private function event(?User $owner = null): QrCode
{
$owner ??= User::factory()->create();
$owner ??= User::factory()->create(['public_id' => 'usr_'.uniqid()]);
return QrCode::create([
'user_id' => $owner->id,
@@ -98,8 +98,9 @@ class CustomDomainTest extends TestCase
public function test_store_requires_event_ownership(): void
{
$event = $this->event();
$intruder = User::factory()->create();
$intruder = User::factory()->create(['public_id' => 'usr_'.uniqid()]);
$this->withoutMiddleware(\App\Http\Middleware\EnsurePlatformSession::class);
$this->actingAs($intruder)
->post(route('events.custom-domain.store', $event), ['host' => 'myevent.com'])
->assertForbidden();