X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=adf589e1a3347f0916bd28fe2e05cda5b155dba9;hp=d5f2bc0cf09a9f5e3c5b656ba620b8446afefc58;hb=d515068ee807efef29b6c8406171be4725d7154f;hpb=69497c3fd7ff560be0e47b4c65076915cca756bc diff --git a/test/unit/ajax.js b/test/unit/ajax.js index d5f2bc0..adf589e 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -240,6 +240,23 @@ test("jQuery.ajax() - error callbacks", function() { }); }); +test("jQuery.ajax() - responseText on error", function() { + + expect( 1 ); + + stop(); + + jQuery.ajax({ + url: url("data/errorWithText.php"), + error: function(xhr) { + strictEqual( xhr.responseText , "plain text message" , "Test jXHR.responseText is filled for HTTP errors" ); + }, + complete: function() { + start(); + } + }); +}); + test(".ajax() - headers" , function() { expect( 2 );