diff --git a/test/collection.js b/test/collection.js index eb7f981a..133aa9a5 100644 --- a/test/collection.js +++ b/test/collection.js @@ -824,4 +824,13 @@ $(document).ready(function() { strictEqual(c.length, 0); }); + test("`update` with non-normal id", function() { + var Collection = Backbone.Collection.extend({ + model: Backbone.Model.extend({idAttribute: '_id'}) + }); + var collection = new Collection({_id: 1}); + collection.update([{_id: 1, a: 1}], {add: false}); + equal(collection.first().get('a'), 1); + }); + });