Changeset 41126 for branches/4.8/tests/qunit/wp-includes/js/wp-api.js
- Timestamp:
- 07/24/2017 08:45:23 PM (7 years ago)
- Location:
- branches/4.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8
-
branches/4.8/tests/qunit/wp-includes/js/wp-api.js
r40364 r41126 116 116 'Post', 117 117 'Tag', 118 'User' 118 'User', 119 'UsersMe', 120 'Settings' 119 121 ]; 120 122 … … 131 133 theModel.fetch().done( function( ) { 132 134 var theModel2 = new wp.api.models[ className ](); 133 theModel2.set( 'id', theModel.attributes [0].id );135 theModel2.set( 'id', theModel.attributes.id ); 134 136 theModel2.fetch().done( function() { 135 137 136 138 // We were able to retrieve the model. 137 139 assert.equal( 138 theModel.attributes [0].id,140 theModel.attributes.id, 139 141 theModel2.get( 'id' ) , 140 142 'We should be able to get a ' + className
Note: See TracChangeset
for help on using the changeset viewer.