diff --git a/test/model.js b/test/model.js index ba5e1ebcd..92f85acd6 100644 --- a/test/model.js +++ b/test/model.js @@ -593,6 +593,13 @@ $(document).ready(function() { ok(model.get('x') === a); }); + test("set same value does not trigger change", 0, function() { + var model = new Backbone.Model({x: 1}); + model.on('change change:x', function() { ok(false); }); + model.set({x: 1}); + model.set({x: 1}); + }); + test("unset does not fire a change for undefined attributes", 0, function() { var model = new Backbone.Model({x: undefined}); model.on('change:x', function(){ ok(false); });