From 62d84e44ac3b4a3673c320514bbf5ac8dc7712d6 Mon Sep 17 00:00:00 2001 From: John Resig Date: Sat, 15 Sep 2007 01:18:30 +0000 Subject: Added a fix for bug #1580, where the query string was appended to the POST data, instead of being left alone. --- test/unit/ajax.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 22caf2ac0..1e1e8123a 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -516,13 +516,20 @@ test("$.getJSON(String, Function) - JSON object", function() { }); test("$.post(String, Hash, Function) - simple with xml", function() { - expect(2); + expect(4); stop(); $.post(url("data/name.php"), {xml: "5-2"}, function(xml){ $('math', xml).each(function() { ok( $('calculation', this).text() == '5-2', 'Check for XML' ); ok( $('result', this).text() == '3', 'Check for XML' ); }); + }); + + $.post(url("data/name.php?xml=5-2"), {}, function(xml){ + $('math', xml).each(function() { + ok( $('calculation', this).text() == '5-2', 'Check for XML' ); + ok( $('result', this).text() == '3', 'Check for XML' ); + }); start(); }); }); -- cgit v1.2.3