Sync _.isFinite changes with Underscore and update vendor/underscore and vendor/backbone.

Former-commit-id: 9acb93a276a11da8186da76bd82f1fd6f89c27dd
This commit is contained in:
John-David Dalton
2012-10-20 13:02:14 -07:00
parent 8c4e882fa3
commit 400b6fbb61
11 changed files with 163 additions and 80 deletions

View File

@@ -17,6 +17,11 @@ $(document).ready(function() {
Environment.prototype.setup.apply(this, arguments);
library = new Library;
library.create(attrs, {wait: false});
},
teardown: function() {
Environment.prototype.teardown.apply(this, arguments);
Backbone.emulateHTTP = false;
}
}));
@@ -157,4 +162,23 @@ $(document).ready(function() {
this.ajaxSettings.error();
});
test("#1756 - Call user provided beforeSend function.", 4, function() {
Backbone.emulateHTTP = true;
var model = new Backbone.Model;
model.url = '/test';
var xhr = {
setRequestHeader: function(header, value) {
strictEqual(header, 'X-HTTP-Method-Override');
strictEqual(value, 'DELETE');
}
};
model.sync('delete', model, {
beforeSend: function(_xhr) {
ok(_xhr === xhr);
return false;
}
});
strictEqual(this.ajaxSettings.beforeSend(xhr), false);
});
});