feat: add published_url column to posts

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Doar Mihai
2026-07-19 16:48:03 +03:00
co-authored by Claude Sonnet 5
parent 30095519e4
commit 80423301c4
3 changed files with 37 additions and 0 deletions
+14
View File
@@ -83,3 +83,17 @@ test('deleting a social account nulls out the post link but keeps the post', fun
->not->toBeNull()
->social_account_id->toBeNull();
});
test('a post can store a published_url', function () {
$post = Post::factory()->create(['published_url' => null]);
$post->update(['published_url' => 'https://example.com/2026/07/my-post']);
expect($post->fresh()->published_url)->toBe('https://example.com/2026/07/my-post');
});
test('published_url defaults to null', function () {
$post = Post::factory()->create();
expect($post->fresh()->published_url)->toBeNull();
});