mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-08 03:00:26 -04:00
Issue #289. Enable the use of jQuery.Deferred by returning Deferred objects from save() and fetch() calls.
This commit is contained in:
15
test/sync.js
15
test/sync.js
@@ -1,14 +1,11 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
module("Backbone.sync");
|
||||
|
||||
// Variable to catch the last request.
|
||||
window.lastRequest = null;
|
||||
|
||||
// Stub out jQuery.ajax...
|
||||
$.ajax = function(obj) {
|
||||
lastRequest = obj;
|
||||
};
|
||||
module("Backbone.sync", {setup : function() {
|
||||
window.lastRequest = null;
|
||||
$.ajax = function(obj) {
|
||||
lastRequest = obj;
|
||||
};
|
||||
}});
|
||||
|
||||
var Library = Backbone.Collection.extend({
|
||||
url : function() { return '/library'; }
|
||||
|
||||
Reference in New Issue
Block a user