From 0f5292b991ee83ee956766d6a7eab75445dd4dea Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Thu, 21 Dec 2006 12:57:22 +0000 Subject: [PATCH] Added test for sync requests with callbacks (#534) --- src/ajax/ajaxTest.js | 6 ++++++ 1 file changed, 6 insertions(+) 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(); -- 1.7.10.4