Skip to content

Commit 28096a6

Browse files
Update schema test
1 parent a691ce6 commit 28096a6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/phpunit/tests/rest-api/rest-attachments-controller.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ public function test_get_item_schema() {
16701670
$response = rest_get_server()->dispatch( $request );
16711671
$data = $response->get_data();
16721672
$properties = $data['schema']['properties'];
1673-
$this->assertCount( 29, $properties );
1673+
$this->assertCount( 30, $properties );
16741674
$this->assertArrayHasKey( 'author', $properties );
16751675
$this->assertArrayHasKey( 'alt_text', $properties );
16761676
$this->assertArrayHasKey( 'caption', $properties );
@@ -1704,6 +1704,7 @@ public function test_get_item_schema() {
17041704
$this->assertArrayHasKey( 'rendered', $properties['title']['properties'] );
17051705
$this->assertArrayHasKey( 'type', $properties );
17061706
$this->assertArrayHasKey( 'missing_image_sizes', $properties );
1707+
$this->assertArrayHasKey( 'trashable', $properties );
17071708
$this->assertArrayHasKey( 'featured_media', $properties );
17081709
$this->assertArrayHasKey( 'class_list', $properties );
17091710
}

tests/qunit/fixtures/wp-api-generated.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13079,6 +13079,7 @@ mockedApiResponse.MediaCollection = [
1307913079
"media_details": {},
1308013080
"post": null,
1308113081
"source_url": "http://example.org/wp-content/uploads//tmp/canola.jpg",
13082+
"trashable": false,
1308213083
"_links": {
1308313084
"self": [
1308413085
{
@@ -13156,7 +13157,8 @@ mockedApiResponse.MediaModel = {
1315613157
"mime_type": "image/jpeg",
1315713158
"media_details": {},
1315813159
"post": null,
13159-
"source_url": "http://example.org/wp-content/uploads//tmp/canola.jpg"
13160+
"source_url": "http://example.org/wp-content/uploads//tmp/canola.jpg",
13161+
"trashable": false
1316013162
};
1316113163

1316213164
mockedApiResponse.TypesCollection = {

0 commit comments

Comments
 (0)