]> source.dussan.org Git - jquery.git/commitdiff
Added test for sync requests with callbacks (#534)
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 21 Dec 2006 12:57:22 +0000 (12:57 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 21 Dec 2006 12:57:22 +0000 (12:57 +0000)
src/ajax/ajaxTest.js

index ad705a10c727eb8f1ef073311f0fd8d48f7022f7..3159fb8142f49401d84805a5ef62d8e150435504 100644 (file)
@@ -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();