backbone.partial-fetch
Advanced tools
Comparing version
@@ -56,2 +56,3 @@ (function () { | ||
} | ||
delete options.url; | ||
collection[method](resp, _.extend(options, {remove: false})); | ||
@@ -58,0 +59,0 @@ if (success) { |
{ | ||
"name": "backbone.partial-fetch", | ||
"description": "Partial fetcher for backbone", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": "Pau ramon <masylum@gmail.com>", | ||
@@ -15,3 +15,3 @@ "keywords": ["backbone", "ender", "teambox"], | ||
"main": "./backbone.partial-fetch.js", | ||
"ender": "./backbone.virtual-collection-0.0.1.js" | ||
"ender": "./backbone.partial-fetch.js" | ||
} |
@@ -83,2 +83,12 @@ /*global it, describe, before, beforeEach*/ | ||
it('does not send the url all along', function() { | ||
gently.expect(tasks, 'sync', function (method, context, options) { | ||
options.success(tasks.models); | ||
}); | ||
gently.expect(tasks, 'set', function (resp, options) { | ||
assert.equal(options.url, undefined); | ||
}); | ||
tasks.partialFetch(); | ||
}); | ||
it('uses Backbones `reset` if option set', function() { | ||
@@ -85,0 +95,0 @@ gently.expect(tasks, 'sync', function (method, context, options) { |
9656
3.72%171
6.21%