aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/ajax.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2010-01-25 00:46:03 -0500
committerJohn Resig <jeresig@gmail.com>2010-01-25 00:46:03 -0500
commitf91b944cabf7be9aadb40ffe35fce76b50f5f25f (patch)
tree58ba8068bdba2806cfa1b14813738f78c4c728f7 /test/unit/ajax.js
parent76236a15062aa82a4841748e9071eb3c9535ef62 (diff)
downloadjquery-f91b944cabf7be9aadb40ffe35fce76b50f5f25f.tar.gz
jquery-f91b944cabf7be9aadb40ffe35fce76b50f5f25f.zip
Objects with length properties weren't getting serialized properly by jQuery.param(). Fixes #5862.
Diffstat (limited to 'test/unit/ajax.js')
-rw-r--r--test/unit/ajax.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index cd3aba0a4..775523e58 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -979,6 +979,19 @@ test("jQuery.getJSON(String, Function) - JSON object with absolute url to local
});
});
+test("jQuery.post - data", function() {
+ expect(2);
+ stop();
+
+ jQuery.post(url("data/name.php"), {xml: "5-2", length: 3}, function(xml){
+ jQuery('math', xml).each(function() {
+ equals( jQuery('calculation', this).text(), '5-2', 'Check for XML' );
+ equals( jQuery('result', this).text(), '3', 'Check for XML' );
+ });
+ start();
+ });
+});
+
test("jQuery.post(String, Hash, Function) - simple with xml", function() {
expect(4);
stop();