Skip to content
Permalink
Browse files

Added testing of encoding of pipe

  • Loading branch information...
darkfrog26 committed Aug 9, 2019
1 parent 90ba791 commit ad8591f85ea0369b65393ebd587a61876cefe727
Showing with 4 additions and 0 deletions.
  1. +4 −0 core/shared/src/test/scala/specs/URLSpec.scala
@@ -21,6 +21,10 @@ class URLSpec extends WordSpec with Matchers {
val url = URL("http://www.outr.com/test?test=one&test=two")
url.paramList("test") should be(List("one", "two"))
}
"properly encode a URL with a pipe" in {
val url = URL("http://youi.io").withParam("testing", "one|two")
url.encoded.toString should be("http://youi.io/?testing=one%7Ctwo")
}
"properly parse a relative URL" in {
val url = URL("http://www.outr.com/examples/../images/test.png")
url.path.encoded should equal("/images/test.png")

0 comments on commit ad8591f

Please sign in to comment.
You can’t perform that action at this time.