aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-01-16 05:36:20 +0100
committerjaubourg <j@ubourg.net>2011-01-16 05:36:20 +0100
commitcfca6d3836476a233cf349abc5f433f1ba7b8feb (patch)
tree379d7da329fe0937a43dd71ad102cc90c81baf2d /test
parent0e93b2e24c67237c1172b5d7b1f75f52904d6a1c (diff)
downloadjquery-cfca6d3836476a233cf349abc5f433f1ba7b8feb.tar.gz
jquery-cfca6d3836476a233cf349abc5f433f1ba7b8feb.zip
Fixed the ajax test regarding the jsonp option set to false and added a test to control the prefilter actually does not tamper with the url.
Diffstat (limited to 'test')
-rw-r--r--test/unit/ajax.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index 2e8a455eb..f26ebadee 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -1117,10 +1117,10 @@ test("jQuery.getScript(String, Function) - no callback", function() {
jQuery.each( [ "Same Domain", "Cross Domain" ] , function( crossDomain , label ) {
test("jQuery.ajax() - JSONP, " + label, function() {
- expect(16);
+ expect(17);
var count = 0;
- function plus(){ if ( ++count == 16 ) start(); }
+ function plus(){ if ( ++count == 17 ) start(); }
stop();
@@ -1343,15 +1343,15 @@ jQuery.each( [ "Same Domain", "Cross Domain" ] , function( crossDomain , label )
jsonpCallback: "XXX",
crossDomain: crossDomain,
beforeSend: function() {
- console.log( this.url );
+ ok( /^data\/jsonp.php\?callback=XXX&_=\d+$/.test( this.url ) ,
+ "The URL wasn't messed with (GET, custom callback name with no url manipulation)" );
+ plus();
},
success: function(data){
- console.log(data);
ok( data.data, "JSON results returned (GET, custom callback name with no url manipulation)" );
plus();
},
error: function(data){
- console.log(data);
ok( false, "Ajax error JSON (GET, custom callback name with no url manipulation)" );
plus();
}