Skip to content

Commit

Permalink
Add test coverage for fixing Safari 2 trailing null character
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Jan 18, 2009
1 parent 78f2c19 commit aab760c
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -150,6 +150,18 @@ def teardown
assert_parses expected, query
end

test "parses params with Safari 2 trailing null character" do
query = "selected[]=1&selected[]=2&selected[]=3\0"
expected = { "selected" => [ "1", "2", "3" ] }
assert_parses expected, query
end

test "parses params with Prototype's hack around Safari 2 trailing null character" do
query = "selected[]=1&selected[]=2&selected[]=3&_="
expected = { "selected" => [ "1", "2", "3" ] }
assert_parses expected, query
end

test "passes through rack middleware and parses params" do
with_muck_middleware do
assert_parses({ "a" => { "b" => "c" } }, "a[b]=c")
Expand Down

0 comments on commit aab760c

Please sign in to comment.