X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=b7eb57d8e841ea458beb41069cff70fe2863e51f;hb=f9f9ee52e16f37900296e06982a7dccba89c5a78;hp=7f3f39aff46c370ceed5e25c47f940fce8b83bdb;hpb=a32f4d7b6c197bcb521c7b0d351328f3821b6fee;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 7f3f39a..b7eb57d 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -68,6 +68,35 @@ test("jQuery.ajax() - error callbacks", function() { }); }); +test(".ajax() - hash", function() { + expect(3); + + jQuery.ajax({ + url: "data/name.html#foo", + beforeSend: function( xhr, settings ) { + equals(settings.url, "data/name.html", "Make sure that the URL is trimmed."); + return false; + } + }); + + jQuery.ajax({ + url: "data/name.html?abc#foo", + beforeSend: function( xhr, settings ) { + equals(settings.url, "data/name.html?abc", "Make sure that the URL is trimmed."); + return false; + } + }); + + jQuery.ajax({ + url: "data/name.html?abc#foo", + data: { "test": 123 }, + beforeSend: function( xhr, settings ) { + equals(settings.url, "data/name.html?abc&test=123", "Make sure that the URL is trimmed."); + return false; + } + }); +}); + test(".ajax() - 304", function() { expect( 1 ); stop();