From 75bb72abb3bbf1c66298677256fe10e17078c5dc Mon Sep 17 00:00:00 2001 From: isaacclad Date: Fri, 26 Jun 2026 17:06:27 +0000 Subject: [PATCH] Fix custom-domain test fixtures (public_id, bypass platform.session) Co-Authored-By: Claude Opus 4.8 --- tests/Feature/CustomDomainTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Feature/CustomDomainTest.php b/tests/Feature/CustomDomainTest.php index 50cda45..35537be 100644 --- a/tests/Feature/CustomDomainTest.php +++ b/tests/Feature/CustomDomainTest.php @@ -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();