diff options
author | adamw <adam@warski.org> | 2017-07-28 15:28:15 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-07-28 15:28:15 +0200 |
commit | df1fff3b2c2f8a0a7cbc3c2101c810358ec49920 (patch) | |
tree | ad4aeaf6942e718a1722e226741d14552e9e7bd8 /tests | |
parent | 8c7945ea87371d02906b84c45dc2d3b92f815306 (diff) | |
download | sttp-df1fff3b2c2f8a0a7cbc3c2101c810358ec49920.tar.gz sttp-df1fff3b2c2f8a0a7cbc3c2101c810358ec49920.tar.bz2 sttp-df1fff3b2c2f8a0a7cbc3c2101c810358ec49920.zip |
Using a custom URI class
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala | 3 | ||||
-rw-r--r-- | tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala b/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala index e5a73f7..262fd35 100644 --- a/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala +++ b/tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala @@ -100,8 +100,7 @@ class BasicTests } } ~ path("secure_basic") { authenticateBasic("test realm", { - case c @ Credentials.Provided(un) - if un == "adam" && c.verify("1234") => + case c @ Credentials.Provided(un) if un == "adam" && c.verify("1234") => Some(un) case _ => None }) { userName => diff --git a/tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala b/tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala index 057ba9e..6137ed2 100644 --- a/tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala +++ b/tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala @@ -12,9 +12,8 @@ class IllTypedTests extends FlatSpec with Matchers { import com.softwaremill.sttp._ import akka.stream.scaladsl.Source import akka.util.ByteString - import java.net.URI implicit val sttpHandler = HttpURLConnectionSttpHandler - sttp.get(new URI("http://example.com")).response(asStream[Source[ByteString, Any]]).send() + sttp.get(uri"http://example.com").response(asStream[Source[ByteString, Any]]).send() """) } @@ -26,7 +25,6 @@ class IllTypedTests extends FlatSpec with Matchers { val thrown = intercept[ToolBoxError] { EvalScala(""" import com.softwaremill.sttp._ - import java.net.URI implicit val sttpHandler = HttpURLConnectionSttpHandler sttp.send() """) |