Skip to content

Commit

Permalink
added update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Woodall committed Jun 1, 2011
1 parent 42480f3 commit 6f7b09f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ $(document).ready(function() {
equals(library.first().get('author'), 'Bill Shakespeare');
equals(library.first().get('length'), 123);
});


test("collection update", function() {
library.first().save({id: '1-the-tempest', author: 'William Shakespeare'});
equals(library.first().get('id'), '1-the-tempest');
equals(library.first().get('title'), 'The Tempest');
equals(library.first().get('author'), 'William Shakespeare');
equals(library.first().get('length'), 123);
});

test("collection destroy", function() {
library.first().destroy();
equals(library.length, 0);
Expand Down

0 comments on commit 6f7b09f

Please sign in to comment.