From: Jörn Zaefferer Date: Thu, 21 Dec 2006 12:57:22 +0000 (+0000) Subject: Added test for sync requests with callbacks (#534) X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;ds=sidebyside;h=0f5292b991ee83ee956766d6a7eab75445dd4dea;p=jquery.git Added test for sync requests with callbacks (#534) --- diff --git a/src/ajax/ajaxTest.js b/src/ajax/ajaxTest.js index ad705a1..3159fb8 100644 --- a/src/ajax/ajaxTest.js +++ b/src/ajax/ajaxTest.js @@ -43,6 +43,12 @@ test("synchronous request", function() { ok( /^{ "data"/.test( $.ajax({url: "data/json.php", async: false}).responseText ), "check returned text" ); }); +test("synchronous request with callbacks", function() { + var result; + $.ajax({url: "data/json.php", async: false, success: function(data) { result = data; }}); + ok( /^{ "data"/.test( result ), "check returned text" ); +}); + test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(2); stop();