feat: edit event type label in dialog, drop non-functional status field

Made-with: Cursor
This commit is contained in:
2026-04-14 21:48:07 +02:00
parent eec222d423
commit c4712cea77
2 changed files with 50 additions and 29 deletions

View File

@@ -201,6 +201,28 @@ class EventTest extends TestCase
->assertJson(['data' => ['name' => 'Updated Festival']]);
}
public function test_org_admin_can_update_event_type_label(): void
{
$event = Event::factory()->series()->create([
'organisation_id' => $this->organisation->id,
'event_type_label' => 'Oud label',
]);
Sanctum::actingAs($this->orgAdmin);
$response = $this->putJson("/api/v1/organisations/{$this->organisation->id}/events/{$event->id}", [
'event_type_label' => 'Schaatsseizoen',
]);
$response->assertOk()
->assertJsonPath('data.event_type_label', 'Schaatsseizoen');
$this->assertDatabaseHas('events', [
'id' => $event->id,
'event_type_label' => 'Schaatsseizoen',
]);
}
public function test_event_manager_can_update_event(): void
{
$event = Event::factory()->create(['organisation_id' => $this->organisation->id]);