X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=d29eddbfa33a33c8675ddb38e228893f3cbccf3e;hb=e2941d5a98e91c5f61b200b2763e5fa0eb339365;hp=d849cff246b8669e7ac610f9c4dfe902a9c1bef5;hpb=7bc538623077abb48d94b33ef8e389d1022b13af;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index d849cff..d29eddb 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -1,4 +1,4 @@ -module("ajax"); +module("ajax", { teardown: moduleTeardown }); // Safari 3 randomly crashes when running these tests, // but only in the full suite - you can run just the Ajax @@ -1081,7 +1081,7 @@ test("jQuery.getScript(String, Function) - no callback", function() { }); test("jQuery.ajax() - JSONP, Local", function() { - expect(9); + expect(10); var count = 0; function plus(){ if ( ++count == 9 ) start(); } @@ -1131,6 +1131,22 @@ test("jQuery.ajax() - JSONP, Local", function() { jQuery.ajax({ url: "data/jsonp.php", dataType: "jsonp", + data: { + callback: "?" + }, + success: function(data){ + ok( data.data, "JSON results returned (GET, processed data callback)" ); + plus(); + }, + error: function(data){ + ok( false, "Ajax error JSON (GET, processed data callback)" ); + plus(); + } + }); + + jQuery.ajax({ + url: "data/jsonp.php", + dataType: "jsonp", jsonp: "callback", success: function(data){ ok( data.data, "JSON results returned (GET, data obj callback)" );