aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-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 868f19bc8..c63fd69d9 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -435,6 +435,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: {},