WordPress.org

Make WordPress Core

Changeset 43586


Ignore:
Timestamp:
08/28/2018 01:04:07 PM (3 years ago)
Author:
flixos90
Message:

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

See #40510.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/qunit/wp-includes/js/wp-api.js

    r41678 r43586  
    401401                    // Get the main endpoint.
    402402                    var endpoint = theModels.at(0);
     403                    var expectedMetas = '{"meta_key":"meta_value"}';
     404                    if ( 'Tags' === modelType ) {
     405                        expectedMetas = '{"test_single":"","test_multi":[],"meta_key":"meta_value","test_tag_meta":""}';
     406                    }
    403407
    404408                    // Verify the meta object returned correctly from `getMetas()`.
    405                     assert.equal( JSON.stringify( endpoint.getMetas() ), '{"meta_key":"meta_value"}', 'Full meta key/values object should be readable.' );
     409                    assert.equal( JSON.stringify( endpoint.getMetas() ), expectedMetas, 'Full meta key/values object should be readable.' );
    406410
    407411                    // Verify single meta returned correctly from `getMeta()`
Note: See TracChangeset for help on using the changeset viewer.