ampersand-sync
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -90,2 +90,4 @@ /*$AMPERSAND_VERSION*/ | ||
params.xhrFields = ajaxConfig.xhrFields; | ||
} else { | ||
params.beforeSend = ajaxConfig.beforeSend; | ||
} | ||
@@ -92,0 +94,0 @@ |
{ | ||
"name": "ampersand-sync", | ||
"description": "Provides sync behavior for updating data from ampersand models and collections to the server.", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"author": "Henrik Joreteg <henrik@andyet.net>", | ||
@@ -6,0 +6,0 @@ "browserify": { |
@@ -219,1 +219,19 @@ var test = require('tape'); | ||
}); | ||
test('Call user provided beforeSend function from model\'s ajaxConfig when no custom xhrFields are passed', function (t) { | ||
t.plan(1); | ||
var Me = Model.extend({ | ||
url: '/hi', | ||
ajaxConfig: { | ||
beforeSend: function (xhr) { | ||
t.pass(); | ||
} | ||
} | ||
}); | ||
var m = new Me(); | ||
var xhr = sync('create', m); | ||
t.end(); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16572
318