fix test
This commit is contained in:
parent
6514a38162
commit
e798bd34ae
2 changed files with 6 additions and 1 deletions
|
|
@ -34,6 +34,11 @@ o.spec("buildQueryString", function() {
|
|||
|
||||
o(string).equals("a%5B0%5D=x&a%5B1%5D=y")
|
||||
})
|
||||
o("handles array w/ dupe values", function() {
|
||||
var string = buildQueryString({a: ["x", "x"]})
|
||||
|
||||
o(string).equals("a%5B0%5D=x&a%5B1%5D=x")
|
||||
})
|
||||
o("handles deep nested array", function() {
|
||||
var string = buildQueryString({a: [["x", "y"]]})
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ o.spec("parseQueryString", function() {
|
|||
})
|
||||
o("does not cast numbers", function() {
|
||||
var data = parseQueryString("a=1&b=-2.3&c=0x10&d=1e2&e=Infinity")
|
||||
o(data).deepEquals({a: "1", b: "-2.3", c: "16", d: "1e2", e: "Infinity"})
|
||||
o(data).deepEquals({a: "1", b: "-2.3", c: "0x10", d: "1e2", e: "Infinity"})
|
||||
})
|
||||
o("does not cast NaN", function() {
|
||||
var data = parseQueryString("a=NaN")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue