Return a published and mime type data with sourced media uploads

This commit is contained in:
Jonny Barnes 2022-11-20 17:10:19 +00:00
parent 84efc8a3da
commit 42f0fa2238
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
3 changed files with 30 additions and 0 deletions

View file

@ -137,6 +137,8 @@ class MicropubMediaTest extends TestCase
);
$sourceUploadResponse->assertJson(['items' => [[
'url' => $response->headers->get('Location'),
'published' => carbon()->toW3cString(),
'mime_type' => 'image/png',
]]]);
// now remove file
@ -168,6 +170,8 @@ class MicropubMediaTest extends TestCase
);
$sourceUploadResponse->assertJson(['items' => [[
'url' => $response->headers->get('Location'),
'published' => carbon()->toW3cString(),
'mime_type' => 'image/png',
]]]);
// And given our limit of 1 there should only be one result
$this->assertCount(1, json_decode($sourceUploadResponse->getContent(), true)['items']);