Allow partial event updates
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-16 15:12:03 +01:00
parent 6d3f4f36e8
commit b316beb522
3 changed files with 36 additions and 4 deletions

View File

@@ -199,6 +199,29 @@ class EventControllerTest extends TenantTestCase
->assertJsonPath('error.code', 'event_limit_exceeded');
}
public function test_update_event_settings_without_required_fields_succeeds(): void
{
$tenant = $this->tenant;
$eventType = EventType::factory()->create();
$event = Event::factory()->create([
'tenant_id' => $tenant->id,
'event_type_id' => $eventType->id,
'date' => Carbon::now()->subDays(2),
'name' => ['de' => 'Test Event', 'en' => 'Test Event'],
'settings' => [],
]);
$response = $this->authenticatedRequest('PUT', "/api/v1/tenant/events/{$event->slug}", [
'settings' => [
'engagement_mode' => 'photo_only',
],
]);
$response->assertOk();
$event->refresh();
$this->assertSame('photo_only', data_get($event->settings, 'engagement_mode'));
}
public function test_create_event_rejects_unavailable_service_tier_for_partner_kontingent(): void
{
$tenant = $this->tenant;