diff options
author | John Resig <jeresig@gmail.com> | 2007-09-15 01:18:30 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2007-09-15 01:18:30 +0000 |
commit | 62d84e44ac3b4a3673c320514bbf5ac8dc7712d6 (patch) | |
tree | 3de47f29f650ce29fe6c5fe1300103cb2591cafc /test | |
parent | d9a3b133f1bf6a283349b5c0ab64b7c09cb9b92b (diff) | |
download | jquery-62d84e44ac3b4a3673c320514bbf5ac8dc7712d6.tar.gz jquery-62d84e44ac3b4a3673c320514bbf5ac8dc7712d6.zip |
Added a fix for bug #1580, where the query string was appended to the POST data, instead of being left alone.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/ajax.js | 9 |
1 files changed, 8 insertions, 1 deletions
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(); }); }); |