aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan Hart <danhart@notonthehighstreet.com>2014-07-13 18:53:00 +0100
committerTimmy Willison <timmywillisn@gmail.com>2014-11-01 12:44:43 -0400
commit598ed050f6931922214aeaea8a1dc867e0cc6fb7 (patch)
treed9fa9c7e3bc00ffad7936bfe4e57f1c48d5fa77b /test
parent31d58c5cbbede6dc33d10feecd5277ccddb367e6 (diff)
downloadjquery-598ed050f6931922214aeaea8a1dc867e0cc6fb7.tar.gz
jquery-598ed050f6931922214aeaea8a1dc867e0cc6fb7.zip
Ajax: Fix for request aborted in ajaxSend
Fixes gh-1775 Close gh-1619
Diffstat (limited to 'test')
-rw-r--r--test/unit/ajax.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index 528d3a496..d61d6b40d 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -440,6 +440,23 @@ module( "ajax", {
};
});
+ ajaxTest( "#15160 - jQuery.ajax() - request manually aborted in ajaxSend", 3, {
+ setup: function() {
+ jQuery( document ).on( "ajaxSend", function( e, jqXHR ) {
+ jqXHR.abort();
+ });
+
+ jQuery( document ).on( "ajaxError ajaxComplete", function( e, jqXHR ) {
+ equal( jqXHR.statusText, "abort", "jqXHR.statusText equals abort on global ajaxComplete and ajaxError events" );
+ });
+ },
+ url: url("data/name.html"),
+ error: true,
+ complete: function() {
+ ok( true, "complete" );
+ }
+ });
+
ajaxTest( "jQuery.ajax() - context modification", 1, {
url: url("data/name.html"),
context: {},