Permalink
Browse files

Merge branch 'master' of github.com:documentcloud/backbone

  • Loading branch information...
jashkenas committed Feb 27, 2012
2 parents 07604de + f8b37a8 commit 54e284bced388d0cd8ad6e871e29dec36937d125
Showing with 15 additions and 1 deletion.
  1. +7 −1 test/sync.js
  2. +8 −0 test/view.js
View
@@ -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);
+ });
+
});
View
@@ -178,4 +178,12 @@ $(document).ready(function() {
equal(count, 2);
});
+ test("#1048 - setElement uses provided object.", function() {
+ var $el = $('body');
+ var view = new Backbone.View({el: $el});
+ ok(view.$el === $el);
+ view.setElement($el = $($el));
+ ok(view.$el === $el);
+ });
+
});

0 comments on commit 54e284b

Please sign in to comment.