Commit 63487505 authored by jaubourg's avatar jaubourg

Added a test for retrying a request on error using jQuery.ajax(this). Works as...

Added a test for retrying a request on error using jQuery.ajax(this). Works as intended. Fixes #7461.
parent afefb4f3
...@@ -257,6 +257,29 @@ test("jQuery.ajax() - responseText on error", function() { ...@@ -257,6 +257,29 @@ test("jQuery.ajax() - responseText on error", function() {
}); });
}); });
test(".ajax() - retry with jQuery.ajax( this )", function() {
expect( 1 );
stop();
var firstTime = 1;
jQuery.ajax({
url: url("data/errorWithText.php"),
error: function() {
if ( firstTime ) {
firstTime = 0;
jQuery.ajax( this );
} else {
ok( true , "Test retrying with jQuery.ajax(this) works" );
start();
}
}
})
});
test(".ajax() - headers" , function() { test(".ajax() - headers" , function() {
expect( 2 ); expect( 2 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment