bd sync: 2026-01-12 17:10:05
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Tenant;
|
||||
|
||||
use App\Models\Event;
|
||||
use App\Models\Photo;
|
||||
|
||||
class PhotoModerationControllerTest extends TenantTestCase
|
||||
{
|
||||
public function test_tenant_admin_can_approve_photo(): void
|
||||
{
|
||||
$event = Event::factory()->for($this->tenant)->create([
|
||||
'slug' => 'moderation-event',
|
||||
]);
|
||||
$photo = Photo::factory()->for($event)->create([
|
||||
'status' => 'pending',
|
||||
]);
|
||||
|
||||
$response = $this->authenticatedRequest('PATCH', "/api/v1/tenant/events/{$event->slug}/photos/{$photo->id}", [
|
||||
'status' => 'approved',
|
||||
]);
|
||||
|
||||
$response->assertOk();
|
||||
$this->assertSame('approved', $photo->refresh()->status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user