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.
This commit is contained in:
parent
8e40a84c24
commit
1ddfdabbb9
2 changed files with 18 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue