Added test for sync requests with callbacks (#534)

This commit is contained in:
Jörn Zaefferer 2006-12-21 12:57:22 +00:00
parent 30f708027f
commit 0f5292b991

View file

@ -43,6 +43,12 @@ test("synchronous request", function() {
ok( /^{ "data"/.test( $.ajax({url: "data/json.php", async: false}).responseText ), "check returned text" ); 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() { test("load(String, Object, Function) - simple: inject text into DOM", function() {
expect(2); expect(2);
stop(); stop();