X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=734465916bd07252be7b34df64ceaa48bc013403;hb=09022e0b09db71259751e7146bb64727615028af;hp=14c6218264a74362bacea9be2f388e0a1441bced;hpb=974b5aeab7a3788ff5fb9db87b9567784e0249fc;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 14c6218..7344659 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -289,6 +289,32 @@ test("jQuery.ajax - xml: non-namespace elements inside namespaced elements", fun }); }); +test("jQuery.ajax - HEAD requests", function() { + expect(2); + + stop(); + jQuery.ajax({ + url: url("data/name.html"), + type: "HEAD", + success: function(data, status, xhr){ + var h = xhr.getAllResponseHeaders(); + ok( /Date/i.test(h), 'No Date in HEAD response' ); + + jQuery.ajax({ + url: url("data/name.html"), + data: { whip_it: "good" }, + type: "HEAD", + success: function(data, status, xhr){ + var h = xhr.getAllResponseHeaders(); + ok( /Date/i.test(h), 'No Date in HEAD response with data' ); + start(); + } + }); + } + }); + +}); + test("jQuery.ajax - beforeSend", function() { expect(1); stop();