feat: edit event type label in dialog, drop non-functional status field
Made-with: Cursor
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user