Skip to content

Instantly share code, notes, and snippets.

@tgriesser
Created October 2, 2012 13:23
Show Gist options
  • Save tgriesser/3819084 to your computer and use it in GitHub Desktop.
Save tgriesser/3819084 to your computer and use it in GitHub Desktop.
here
test("#1664 - silent changes on changing attributes triggered by other attributes", 1, function() {
var changes = [];
var model = new Backbone.Model({a:'a', b:1, c:'item'});
model.on('change:a change:b change:c', function(model, val) { changes.push(val); });
model.on('change', function() {
model.set({a:'c'}, {silent:true});
});
model.change();
model.set({a:'a'}, {silent:true});
model.change();
deepEqual(changes, []);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment