You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test( "Prove that Collection#parse is called with a RelationalModel as the response", function() {
var parseArg;
var Contact = Backbone.RelationalModel.extend();
var Contacts = Backbone.Collection.extend({
model: Contact,
url: '/contacts',
parse: function( response ) {
parseArg = response;
return response.items;
}
});
var contacts = new Contacts();
contacts.create({ foo: 3 }, {
wait: true,
// fake response for testing
response: {
status: 200,
responseText: { foo: 3 }
}
});
equal(parseArg instanceof Backbone.RelationalModel, true);
});
and I doubt it's the expected behavior given that w/o wait: true the same test fails. Collection#parse is also never called if you use the original backbone model instead of the RelationalModel.
The text was updated successfully, but these errors were encountered:
This test passes:
and I doubt it's the expected behavior given that w/o
wait: true
the same test fails.Collection#parse
is also never called if you use the original backbone model instead of theRelationalModel
.The text was updated successfully, but these errors were encountered: