From 89ce0af2cf7f001647e74fc1de92ce94a51fd5c2 Mon Sep 17 00:00:00 2001 From: George Mauer Date: Mon, 5 Jan 2015 21:00:12 -0600 Subject: Ajax: $.post and $.get can now take an options object Fixes gh-1986 Closes gh-1995 --- test/unit/ajax.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/unit') diff --git a/test/unit/ajax.js b/test/unit/ajax.js index b41654db9..29a4dfb46 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -2034,6 +2034,26 @@ module( "ajax", { }); }); + asyncTest( "jQuery[get|post]( options ) - simple with xml", 2, function() { + jQuery.when.apply( jQuery, + jQuery.map( [ "get", "post" ] , function( method ) { + return jQuery[ method ]({ + url: url( "data/name.php" ), + data: { + "xml": "5-2" + }, + success: function( xml ) { + jQuery( "math", xml ).each(function() { + strictEqual( jQuery( "result", this ).text(), "3", "Check for XML" ); + }); + } + }); + }) + ).always(function() { + start(); + }); + }); + //----------- jQuery.active test( "jQuery.active", 1, function() { -- cgit v1.2.3