X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=0464c7b5fbb9b72f31d144f2bcc61ee3fdcc2ab4;hb=3c5b1ca03ba6ca8504e7ba1c61c4d639814f4233;hp=4a823ac1b098c636086235eb59b9e11ec3bf8529;hpb=8a66a30fece5db98a5f606b11c15fef1016d045a;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 4a823ac..0464c7b 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -379,7 +379,7 @@ test("jQuery.param()", function() { params = { a:[1,2], b:{ c:3, d:[4,5], e:{ x:[6], y:7, z:[8,9] }, f:true, g:false, h:undefined }, i:[10,11], j:true, k:false, l:[undefined,0], m:"cowboy hat?" }; equals( jQuery.param(params,true), "a=1&a=2&b=%5Bobject+Object%5D&i=10&i=11&j=true&k=false&l=undefined&l=0&m=cowboy+hat%3F", "huge structure, forced traditional" ); - equals( decodeURIComponent( jQuery.param({ "test[]": [0, 1, 2] }) ), "test[]=0&test[]=1&test[]=2", "Make sure params are double-encoded." ); + equals( decodeURIComponent( jQuery.param({ a: [1,2,3], 'b[]': [4,5,6], 'c[d]': [7,8,9], e: { f: [10], g: [11,12], h: 13 } }) ), "a[]=1&a[]=2&a[]=3&b[]=4&b[]=5&b[]=6&c[d][]=7&c[d][]=8&c[d][]=9&e[f][]=10&e[g][]=11&e[g][]=12&e[h]=13", "Make sure params are not double-encoded." ); jQuery.ajaxSetup({ traditional: true });