Skip to content
Permalink
Browse files

Places multiple signature test after all primary callbacks tests.

  • Loading branch information
jaubourg committed Feb 1, 2011
1 parent af70dee commit eb5aab99525ede9f8609fbfc741c6337cf2d5061
Showing with 15 additions and 15 deletions.
  1. +15 −15 test/unit/ajax.js
@@ -38,21 +38,6 @@ test("jQuery.ajax() - success 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() - success callbacks - (url, options) syntax", function() {
expect( 8 );

@@ -255,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;

0 comments on commit eb5aab9

Please sign in to comment.
You can’t perform that action at this time.