adding a bit more of a test for changedattributes.

This commit is contained in:
Jeremy Ashkenas
2010-12-02 09:47:12 -05:00
parent 6a0ac93086
commit d4dc736a82

View File

@@ -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');