X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=test%2Funit%2Fajax.js;h=4c8c5009be66ffb4fbd74e861bc13e1ec3a894bf;hb=c55a76a23fdf8e9b22d9792a0f3a39051cc33993;hp=14f8928572bd90963401f5f01594a342b57dcf9d;hpb=afefb4f3d28f47c0a93cc9dfddfcbadb595a8efb;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 14f8928..4c8c500 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -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() { expect( 2 );