Fixes #7229 and #5803
[jquery.git] / test / unit / ajax.js
index 5704d73..14c6218 100644 (file)
@@ -799,6 +799,21 @@ test("jQuery.ajax() - JSONP, Local", function() {
                        plus();
                }
        });
+       
+  // Supports Ticket #5803     
+       jQuery.ajax({
+               url: "data/jsonp.php",
+               jsonpCallback: "jsonpResults",
+               success: function(data){
+                       ok( data.data, "JSON results returned without dataType:jsonp when jsonpCallback is defined" );
+                       plus();
+               },
+               error: function(data){
+                       ok( false, "Ajax error JSON (GET, custom callback name)" );
+                       plus();
+               }
+       });             
+       
 });
 
 test("JSONP - Custom JSONP Callback", function() {