Add approve-and-live action for Live Show
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-05 14:16:27 +01:00
parent 148c075d58
commit 99186e8e2f
7 changed files with 172 additions and 10 deletions

View File

@@ -54,6 +54,33 @@ class LiveShowPhotoControllerTest extends TenantTestCase
$response->assertJsonPath('error.code', 'photo_not_approved');
}
public function test_live_show_approve_and_live_updates_gallery_and_live_status(): void
{
$event = Event::factory()->for($this->tenant)->create([
'slug' => 'live-show-approve-live',
]);
$photo = Photo::factory()->for($event)->create([
'status' => 'pending',
'live_status' => PhotoLiveStatus::PENDING,
]);
$response = $this->authenticatedRequest(
'POST',
"/api/v1/tenant/events/{$event->slug}/live-show/photos/{$photo->id}/approve-and-live",
['priority' => 9]
);
$response->assertOk();
$this->assertDatabaseHas('photos', [
'id' => $photo->id,
'status' => 'approved',
'moderated_by' => $this->tenantUser->id,
'live_status' => PhotoLiveStatus::APPROVED->value,
'live_priority' => 9,
]);
}
public function test_live_show_approve_reject_and_clear_workflow(): void
{
$event = Event::factory()->for($this->tenant)->create([