X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=b51419d975c3848c0ede531897976f729570dce5;hb=eb5aab99525ede9f8609fbfc741c6337cf2d5061;hp=a536b9f832182a9463b64c8709e129d04a08a951;hpb=f43572d3b86074afc561822b7fd9592e1f05d19b;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index a536b9f..b51419d 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -240,6 +240,21 @@ test("jQuery.ajax() - error callbacks", function() { }); }); +test( "jQuery.ajax - multiple method signatures introduced in 1.5 ( #8107)", function() { + + expect( 4 ); + + stop(); + + jQuery.when( + jQuery.ajax().success(function() { ok( true, 'With no arguments' ); }), + jQuery.ajax('data/name.html').success(function() { ok( true, 'With only string URL argument' ); }), + jQuery.ajax('data/name.html', {} ).success(function() { ok( true, 'With string URL param and map' ); }), + jQuery.ajax({ url: 'data/name.html'} ).success(function() { ok( true, 'With only map' ); }) + ).then( start, start ); + +}); + test("jQuery.ajax() - textStatus and errorThrown values", function() { var nb = 2;