Tell scheduling apart from unpublishing in the history

Giving a record a future date was recorded as "unpublished", and announced
to webhooks as such. The history now compares before and after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 10:09:03 +02:00
parent 1fe1e67773
commit 70521d4bc9
7 changed files with 35 additions and 15 deletions

View File

@@ -158,6 +158,10 @@ class ReviewAndHistoryApiTest extends TestCase
->assertJsonPath('data.awaiting_review', false)
->assertJsonPath('data.published_at', $at->toIso8601String());
// A date in the future is neither live nor taken down, and the
// history says so.
$this->assertSame('scheduled', $project->revisions()->first()->event);
$this->postJson("/api/v1/projects/{$project->id}/unpublish")
->assertOk()
->assertJsonPath('data.published_at', null);