mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
* Adjusted query string array representation to remove indices. * Increased major version since the new _encodeParams() result is not backwards compatiable.
15 lines
420 B
JavaScript
15 lines
420 B
JavaScript
Tinytest.add('url - serializes params to query correctly', function (test) {
|
|
var hash = {
|
|
filter: {
|
|
type: 'Foo',
|
|
id_eq: 15,
|
|
},
|
|
array: ['1', 'a', 'dirty[]'],
|
|
hasOwnProperty: 'horrible param name',
|
|
};
|
|
var query =
|
|
'filter[type]=Foo&filter[id_eq]=15&array[]=1&array[]=a'
|
|
+ '&array[]=dirty%5B%5D&hasOwnProperty=horrible+param+name';
|
|
test.equal(URL._encodeParams(hash), query);
|
|
});
|