diff options
Diffstat (limited to 'src/ajax/ajaxTest.js')
-rw-r--r-- | src/ajax/ajaxTest.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ajax/ajaxTest.js b/src/ajax/ajaxTest.js index 98f7cfcdd..a84df1d6c 100644 --- a/src/ajax/ajaxTest.js +++ b/src/ajax/ajaxTest.js @@ -277,4 +277,21 @@ test("$.ajax - xml: non-namespace elements inside namespaced elements", function start(); } }); +}); + +test("$.ajax - preprocess", function() { + expect(1); + stop(); + var customHeader = "value-for-custom-header"; + $.ajax({ + url: "data/name.php", + data: {'req': true}, + preprocess: function(xml) { + xml.setRequestHeader('customHeader', customHeader) + }, + success: function(data) { + ok( data == customHeader, "check return value, should be the custom header sent" ); + start(); + } + }); });
\ No newline at end of file |