diff options
author | jaubourg <j@ubourg.net> | 2011-02-15 21:47:52 +0100 |
---|---|---|
committer | jaubourg <j@ubourg.net> | 2011-02-15 21:53:38 +0100 |
commit | 1ddfdabbb983e2d3bf7f7200a3da5051f274e6fe (patch) | |
tree | 8452ff64ac288486092ee947495c9905685391fb /test/unit/ajax.js | |
parent | 8e40a84c24271c0a9253902ceb97185f243a3318 (diff) | |
download | jquery-1ddfdabbb983e2d3bf7f7200a3da5051f274e6fe.tar.gz jquery-1ddfdabbb983e2d3bf7f7200a3da5051f274e6fe.zip |
Fixes #8277. Sets data to undefined rather than null when it is not provided in ajax helpers so that it won't revent data set in ajaxSettings from being used. Unit test added.
Diffstat (limited to 'test/unit/ajax.js')
-rw-r--r-- | test/unit/ajax.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js index c9c06111f..80da7f8f8 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -1196,6 +1196,21 @@ test("load(String, String, Function)", function() { }); }); +test("jQuery.get(String, Function) - data in ajaxSettings (#8277)", function() { + expect(1); + stop(); + jQuery.ajaxSetup({ + data: "helloworld" + }); + jQuery.get(url('data/echoQuery.php'), function(data) { + ok( /helloworld$/.test( data ), 'Data from ajaxSettings was used'); + jQuery.ajaxSetup({ + data: null + }); + start(); + }); +}); + test("jQuery.get(String, Hash, Function) - parse xml and use text() on nodes", function() { expect(2); stop(); |