X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=7f3f39aff46c370ceed5e25c47f940fce8b83bdb;hb=a32f4d7b6c197bcb521c7b0d351328f3821b6fee;hp=fe44ba3b619ca88f92efbca238d7f441e8f4e440;hpb=d1931a8241dcac1617cc8388f6dd6284c89c545d;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index fe44ba3..7f3f39a 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -68,6 +68,18 @@ test("jQuery.ajax() - error callbacks", function() { }); }); +test(".ajax() - 304", function() { + expect( 1 ); + stop(); + + jQuery.ajax({ + url: url("data/notmodified.php"), + success: function(){ ok(true, "304 ok"); }, + error: function(){ ok(false, "304 not ok "); }, + complete: function(xhr){ start(); } + }); +}); + test(".load()) - 404 error callbacks", function() { expect( 6 ); stop(); @@ -1163,6 +1175,19 @@ test("data option: evaluate function values (#2806)", function() { }) }); +test("data option: empty bodies for non-GET requests", function() { + stop(); + jQuery.ajax({ + url: "data/echoData.php", + data: undefined, + type: "post", + success: function(result) { + equals( result, "" ); + start(); + } + }) +}); + test("jQuery.ajax - If-Modified-Since support", function() { expect( 3 );