REST API: Fix failing tests after [43584] and [43585].

See #40510.


git-svn-id: https://develop.svn.wordpress.org/trunk@43586 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Felix Arntz 2018-08-28 13:04:07 +00:00
parent 65cadaab62
commit aa5b179247
1 changed files with 5 additions and 1 deletions

View File

@ -400,9 +400,13 @@
// Get the main endpoint.
var endpoint = theModels.at(0);
var expectedMetas = '{"meta_key":"meta_value"}';
if ( 'Tags' === modelType ) {
expectedMetas = '{"test_single":"","test_multi":[],"meta_key":"meta_value","test_tag_meta":""}';
}
// Verify the meta object returned correctly from `getMetas()`.
assert.equal( JSON.stringify( endpoint.getMetas() ), '{"meta_key":"meta_value"}', 'Full meta key/values object should be readable.' );
assert.equal( JSON.stringify( endpoint.getMetas() ), expectedMetas, 'Full meta key/values object should be readable.' );
// Verify single meta returned correctly from `getMeta()`
assert.equal( endpoint.getMeta( 'meta_key' ), 'meta_value', 'Single meta should be readable by key.' );