Skip to content

Commit 38bb49a

Browse files
no-longer-on-githu-bowickstrom
authored andcommitted
Test that form parsing handles percent-encoded URI components
1 parent 6eaf572 commit 38bb49a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/Hyper/FormSpec.purs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ spec =
4141
form <- runParseForm "foo=bar" Nothing
4242
form `shouldEqual` (Form [Tuple "foo" (Just "bar")])
4343

44+
it "handles percent-encoding" do
45+
form <- runParseForm "foo=%62%61%72" Nothing
46+
form `shouldEqual` (Form [Tuple "foo" (Just "bar")])
47+
4448
it "parses multiple keys and values" do
4549
form <- runParseForm "foo=bar&baz=quux&a=1&b=2" Nothing
4650
form `shouldEqual` (Form [ Tuple "foo" (Just "bar")

0 commit comments

Comments
 (0)