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:
parent
65cadaab62
commit
aa5b179247
@ -400,9 +400,13 @@
|
|||||||
|
|
||||||
// Get the main endpoint.
|
// Get the main endpoint.
|
||||||
var endpoint = theModels.at(0);
|
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()`.
|
// 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()`
|
// Verify single meta returned correctly from `getMeta()`
|
||||||
assert.equal( endpoint.getMeta( 'meta_key' ), 'meta_value', 'Single meta should be readable by key.' );
|
assert.equal( endpoint.getMeta( 'meta_key' ), 'meta_value', 'Single meta should be readable by key.' );
|
||||||
|
Loading…
Reference in New Issue
Block a user