feat: expose cms_type/WordPress credentials and published_url in API responses
This commit is contained in:
@@ -134,3 +134,11 @@ test('it deletes a post', function () {
|
||||
$response->assertNoContent();
|
||||
expect(Post::find($post->id))->toBeNull();
|
||||
});
|
||||
|
||||
test('it includes published_url in the post response', function () {
|
||||
$post = Post::factory()->create(['published_url' => 'https://example.com/my-post']);
|
||||
|
||||
$response = $this->getJson("/api/posts/{$post->id}");
|
||||
|
||||
$response->assertOk()->assertJsonPath('data.published_url', 'https://example.com/my-post');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user