Upgrade to jQuery 1.8.x
Needed to change a test to reflect newer AJAX response code rewriting by jQuery. Not exactly sure of the history here.
This commit is contained in:
parent
3040e9f1d1
commit
7d2fe67852
11734
frameworks/jquery.js
vendored
11734
frameworks/jquery.js
vendored
File diff suppressed because it is too large
Load Diff
@ -165,7 +165,7 @@ describe("Jasmine Mock Ajax (for jQuery)", function() {
|
||||
sharedContext.status = responseObject.status;
|
||||
sharedContext.contentType = responseObject.contentType;
|
||||
sharedContext.responseText = responseObject.responseText;
|
||||
|
||||
|
||||
response = success.mostRecentCall.args[2];
|
||||
});
|
||||
|
||||
@ -237,25 +237,25 @@ describe("Jasmine Mock Ajax (for jQuery)", function() {
|
||||
response = {status: 0, responseText: '{"foo": "whoops!"}'};
|
||||
request.response(response);
|
||||
|
||||
sharedContext.responseCallback = success;
|
||||
sharedContext.status = 304; /* jQuery detects status code zero as 304 when headers are present */
|
||||
sharedContext.responseCallback = error;
|
||||
sharedContext.status = 0;
|
||||
sharedContext.contentType = 'application/json';
|
||||
sharedContext.responseText = response.responseText;
|
||||
});
|
||||
|
||||
it("should call the success handler", function() {
|
||||
expect(success).toHaveBeenCalled();
|
||||
expect(success).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should not call the failure handler", function() {
|
||||
expect(error).not.toHaveBeenCalled();
|
||||
expect(error).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
it("should call the complete handler", function() {
|
||||
expect(complete).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
sharedAjaxResponseBehaviorForJQuery_Success(sharedContext);
|
||||
sharedAjaxResponseBehaviorForJQuery_Failure(sharedContext);
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user