jquery ajax: support for dynamic data arguments, see #2806; added test/data/echoQuery...
[jquery.git] / test / unit / ajax.js
index c8bf2ce..a5891c5 100644 (file)
@@ -811,6 +811,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();
+               }
+       })
+});
+
 }
 
 //}