aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/ajax.js
diff options
context:
space:
mode:
authorDan Heberden <danheberden@gmail.com>2011-01-31 19:37:28 -0800
committerDan Heberden <danheberden@gmail.com>2011-01-31 19:37:28 -0800
commit31949fa528141dad4b92851212677b039cb23cfb (patch)
treeb425fd227834d68279a77231aa5099ec3e5eef2c /test/unit/ajax.js
parentf43572d3b86074afc561822b7fd9592e1f05d19b (diff)
downloadjquery-31949fa528141dad4b92851212677b039cb23cfb.tar.gz
jquery-31949fa528141dad4b92851212677b039cb23cfb.zip
Bug 8107; Fix argument handling for $.ajax for multiple method signatues and add test case
Diffstat (limited to 'test/unit/ajax.js')
-rw-r--r--test/unit/ajax.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index a536b9f83..25e021873 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -2161,6 +2161,25 @@ test("jQuery.ajax - active counter", function() {
ok( jQuery.active == 0, "ajax active counter should be zero: " + jQuery.active );
});
+test( "jQuery.ajax - multiple method signatures introduced in 1.5 ( #8107)", 4, function() {
+
+ expect( 3 );
+
+ var i = 3;
+
+ jQuery.ajaxSetup({success: function() {
+ ok( true, "Success");
+ if ( ! --i ) start();
+ }});
+
+ stop();
+ jQuery.ajax('data/name.html');
+ jQuery.ajax('data/name.html', {} );
+ jQuery.ajax({ url: 'data/name.html'} );
+
+ jQuery.ajaxSetup({ success: null });
+});
+
}
//} \ No newline at end of file