diff options
author | adamw <adam@warski.org> | 2017-09-04 11:28:01 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-09-04 11:28:01 +0200 |
commit | f0f428c85ef6f24e98f9465248d9155d29dc5b4d (patch) | |
tree | 32b0921a5d4b5bed12fdd0225ac8dfdf6a696b8f /core/src/test/scala/com | |
parent | caf69a9742bf6a8593208af30ec27b7006e91328 (diff) | |
download | sttp-f0f428c85ef6f24e98f9465248d9155d29dc5b4d.tar.gz sttp-f0f428c85ef6f24e98f9465248d9155d29dc5b4d.tar.bz2 sttp-f0f428c85ef6f24e98f9465248d9155d29dc5b4d.zip |
#33: properly escape path segments in URIs
Diffstat (limited to 'core/src/test/scala/com')
-rw-r--r-- | core/src/test/scala/com/softwaremill/sttp/UriTests.scala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/src/test/scala/com/softwaremill/sttp/UriTests.scala b/core/src/test/scala/com/softwaremill/sttp/UriTests.scala index c9bb8b5..f421413 100644 --- a/core/src/test/scala/com/softwaremill/sttp/UriTests.scala +++ b/core/src/test/scala/com/softwaremill/sttp/UriTests.scala @@ -31,17 +31,19 @@ class UriTests extends FunSuite with Matchers { List("a b", "z", "ą:ę"), List(QF.KeyValue("p:1", "v&v"), QF.KeyValue("p2", "v v")), None) -> - "http://exa%20mple.com/a%20b/z/%C4%85%3A%C4%99?p%3A1=v%26v&p2=v+v", + "http://exa%20mple.com/a%20b/z/%C4%85:%C4%99?p%3A1=v%26v&p2=v+v", Uri("http", - Some(UserInfo("us&er", Some("pa ss"))), + Some(UserInfo("us&e/r", Some("pa ss"))), "example.com", None, Nil, Nil, None) -> - "http://us%26er:pa%20ss@example.com", + "http://us&e%2Fr:pa%20ss@example.com", Uri("http", None, "example.com", None, Nil, Nil, Some("f:g/h i")) -> - "http://example.com#f:g/h%20i" + "http://example.com#f:g/h%20i", + Uri("http", None, "example.com", None, List("key=value"), Nil, None) -> + "http://example.com/key=value" ) for { |