aboutsummaryrefslogtreecommitdiff
path: root/tests/src/test
diff options
context:
space:
mode:
authoradamw <adam@warski.org>2017-07-28 15:28:15 +0200
committeradamw <adam@warski.org>2017-07-28 15:28:15 +0200
commitdf1fff3b2c2f8a0a7cbc3c2101c810358ec49920 (patch)
treead4aeaf6942e718a1722e226741d14552e9e7bd8 /tests/src/test
parent8c7945ea87371d02906b84c45dc2d3b92f815306 (diff)
downloadsttp-df1fff3b2c2f8a0a7cbc3c2101c810358ec49920.tar.gz
sttp-df1fff3b2c2f8a0a7cbc3c2101c810358ec49920.tar.bz2
sttp-df1fff3b2c2f8a0a7cbc3c2101c810358ec49920.zip
Using a custom URI class
Diffstat (limited to 'tests/src/test')
-rw-r--r--tests/src/test/scala/com/softwaremill/sttp/BasicTests.scala3
-rw-r--r--tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala4
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()
""")