feat: local sections in sub-events can use festival-level time slots

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 11:16:32 +02:00
parent 37fecf7181
commit 03ca1a50a7
7 changed files with 164 additions and 37 deletions

View File

@@ -126,6 +126,30 @@ class TimeSlotTest extends TestCase
->assertJson(['data' => ['name' => 'Vrijdag Avond Updated']]);
}
public function test_update_cross_org_returns_403(): void
{
$timeSlot = TimeSlot::factory()->create(['event_id' => $this->event->id]);
Sanctum::actingAs($this->outsider);
$response = $this->putJson("/api/v1/events/{$this->event->id}/time-slots/{$timeSlot->id}", [
'name' => 'Hacked',
]);
$response->assertForbidden();
}
public function test_destroy_cross_org_returns_403(): void
{
$timeSlot = TimeSlot::factory()->create(['event_id' => $this->event->id]);
Sanctum::actingAs($this->outsider);
$response = $this->deleteJson("/api/v1/events/{$this->event->id}/time-slots/{$timeSlot->id}");
$response->assertForbidden();
}
public function test_destroy_deletes_time_slot(): void
{
$timeSlot = TimeSlot::factory()->create(['event_id' => $this->event->id]);