Fixing request data param issue. Thanks to mislav for the patch. Fixes #5123.
[jquery.git] / test / unit / ajax.js
index fe44ba3..8e3c4b6 100644 (file)
@@ -1163,6 +1163,19 @@ test("data option: evaluate function values (#2806)", function() {
        })
 });
 
+test("data option: empty bodies for non-GET requests", function() {
+       stop();
+       jQuery.ajax({
+               url: "data/echoData.php",
+               data: undefined,
+               type: "post",
+               success: function(result) {
+                       equals( result, "" );
+                       start();
+               }
+       })
+});
+
 test("jQuery.ajax - If-Modified-Since support", function() {
        expect( 3 );