diff options
Diffstat (limited to 'test/unit/ajax.js')
-rw-r--r-- | test/unit/ajax.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 7ecedc212..bcaa7651d 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -3148,4 +3148,27 @@ if ( typeof window.ArrayBuffer === "undefined" || typeof new XMLHttpRequest().re }; } ); + ajaxTest( "jQuery.ajax() - non-plain object", 1, function( assert ) { + return { + url: url( "mock.php?action=name" ), + method: "post", + data: Object.create( { name: "peter" } ), + success: function( data ) { + assert.strictEqual( data, "ERROR", "Data correctly not sent" ); + } + }; + } ); + + ajaxTest( "jQuery.ajax() - non-plain object with processData: true", 1, function( assert ) { + return { + url: url( "mock.php?action=name" ), + method: "post", + processData: true, + data: Object.create( { name: "peter" } ), + success: function( data ) { + assert.strictEqual( data, "pan", "Data sent correctly" ); + } + }; + } ); + } )(); |