From e91b36c0cb0ac877082d3367a8df44d21919e85c Mon Sep 17 00:00:00 2001
From: Genadi Samokovarov Backbone.Model
- {url: "..."} and/or {urlRoot: "..."} options may be passed - when creating a new model that needs to have a custom one-off URL endpoint. + {urlRoot: "..."} option may be passed when creating a new model + that needs to have a custom one-off URL endpoint.
diff --git a/test/model.js b/test/model.js index 3b196c48e..620a9917a 100644 --- a/test/model.js +++ b/test/model.js @@ -111,11 +111,9 @@ $(document).ready(function() { equal(model.url(), '/nested/1/collection/2'); }); - test('url and urlRoot are directly attached if passed in the options', 2, function () { - var model = new Backbone.Model({a: 1}, {url: '/test'}); - var model2 = new Backbone.Model({a: 2}, {urlRoot: '/test2'}); - equal(model.url, '/test'); - equal(model2.urlRoot, '/test2'); + test('urlRoot is directly attached if passed in the options', 1, function () { + var model = new Backbone.Model({a: 2}, {urlRoot: '/test'}); + equal(model.urlRoot, '/test'); }); test("underscore methods", 5, function() {