mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-22 21:38:00 -05:00
adding a bit more of a test for changedattributes.
This commit is contained in:
@@ -150,6 +150,7 @@ $(document).ready(function() {
|
||||
|
||||
test("Model: change, hasChanged, changedAttributes, previous, previousAttributes", function() {
|
||||
var model = new Backbone.Model({name : "Tim", age : 10});
|
||||
equals(model.changedAttributes(), false);
|
||||
model.bind('change', function() {
|
||||
ok(model.hasChanged('name'), 'name changed');
|
||||
ok(!model.hasChanged('age'), 'age did not');
|
||||
|
||||
Reference in New Issue
Block a user