X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=4ce14c24cf6bd3d046f8e287d440f667b6cce3bc;hb=e57b73a0ac6f8fd0cdbbe7d43f1c7e198f475337;hp=b2e51fbcf3bcf573cd5f74ddff49fecde583edb3;hpb=de58db0cdf4dc08db8683ad6cd0035c5d64b26ac;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index b2e51fb..4ce14c2 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -137,7 +137,7 @@ test(".load()) - 404 error callbacks", function() { }); test("jQuery.ajax() - abort", function() { - expect( 6 ); + expect( 8 ); stop(); jQuery('#foo').ajaxStart(function(){ @@ -157,7 +157,10 @@ test("jQuery.ajax() - abort", function() { complete: function(){ ok(true, "complete"); } }); + equals( xhr.readyState, 1, "XHR readyState indicates successful dispatch" ); + xhr.abort(); + equals( xhr.readyState, 0, "XHR readyState indicates successful abortion" ); }); test("Ajax events with context", function() {