Fix custom-domain test fixtures (public_id, bypass platform.session)
Deploy Ladill Events / deploy (push) Successful in 39s
Deploy Ladill Events / deploy (push) Successful in 39s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
8cca4fb6e3
commit
75bb72abb3
@@ -31,7 +31,7 @@ class CustomDomainTest extends TestCase
|
|||||||
|
|
||||||
private function event(?User $owner = null): QrCode
|
private function event(?User $owner = null): QrCode
|
||||||
{
|
{
|
||||||
$owner ??= User::factory()->create();
|
$owner ??= User::factory()->create(['public_id' => 'usr_'.uniqid()]);
|
||||||
|
|
||||||
return QrCode::create([
|
return QrCode::create([
|
||||||
'user_id' => $owner->id,
|
'user_id' => $owner->id,
|
||||||
@@ -98,8 +98,9 @@ class CustomDomainTest extends TestCase
|
|||||||
public function test_store_requires_event_ownership(): void
|
public function test_store_requires_event_ownership(): void
|
||||||
{
|
{
|
||||||
$event = $this->event();
|
$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)
|
$this->actingAs($intruder)
|
||||||
->post(route('events.custom-domain.store', $event), ['host' => 'myevent.com'])
|
->post(route('events.custom-domain.store', $event), ['host' => 'myevent.com'])
|
||||||
->assertForbidden();
|
->assertForbidden();
|
||||||
|
|||||||
Reference in New Issue
Block a user