defaulting Backbone.Collection#model to be Backbone.Model

This commit is contained in:
Jeremy Ashkenas
2010-10-06 13:41:37 -04:00
parent 80acf9484d
commit b1277b9258
2 changed files with 13 additions and 2 deletions

View File

@@ -79,4 +79,12 @@ $(document).ready(function() {
equals(lastRequest[1], col);
});
test("collections: create", function() {
var model = col.create({label: 'f'});
equals(lastRequest[0], 'POST');
equals(lastRequest[1], model);
equals(model.get('label'), 'f');
equals(model.collection, col);
});
});