Skip to content

Commit

Permalink
Add a test for jashkenas#1052.
Browse files Browse the repository at this point in the history
  • Loading branch information
braddunbar committed Feb 27, 2012
1 parent b37a096 commit 111d5a1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,18 @@ $(document).ready(function() {
});

test("sync: urlError", function() {
model = new Backbone.Model();
var model = new Backbone.Model();
raises(function() {
model.fetch();
});
model.fetch({url: '/one/two'});
equal(lastRequest.url, '/one/two');
});

test("#1052 - `options` is optional.", function() {
var model = new Backbone.Model();
model.url = '/test';
Backbone.sync('create', model);
});

});

0 comments on commit 111d5a1

Please sign in to comment.