ajax test: Removed test for extending with null.
[jquery.git] / test / unit / ajax.js
index c8bf2ce..fc2ab9e 100644 (file)
@@ -298,19 +298,15 @@ test("ajax cache", function () {
 });
 
 test("global ajaxSettings", function() {
-       expect(3);
+       expect(2);
 
        var tmp = jQuery.extend({}, jQuery.ajaxSettings);
-    var orig = { url: "data/with_fries.xml", data: null };
+    var orig = { url: "data/with_fries.xml" };
        var t;
 
        $.ajaxSetup({ data: {foo: 'bar', bar: 'BAR'} });
 
     t = jQuery.extend({}, orig);
-    $.ajax(t);
-       ok( t.url.indexOf('foo') > -1 && t.url.indexOf('bar') > -1, "Check extending null" );
-
-    t = jQuery.extend({}, orig);
        t.data = {};
     $.ajax(t);
        ok( t.url.indexOf('foo') > -1 && t.url.indexOf('bar') > -1, "Check extending {}" );
@@ -811,6 +807,22 @@ test("custom timeout does not set error message when timeout occurs, see #970",
        });
 });
 
+test("data option: evaluate function values (#2806)", function() {
+       stop();
+       $.ajax({
+               url: "data/echoQuery.php",
+               data: {
+                       key: function() {
+                               return "value";
+                       }
+               },
+               success: function(result) {
+                       equals( result, "key=value" );
+                       start();
+               }
+       })
+});
+
 }
 
 //}