diff options
Diffstat (limited to 'tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala')
-rw-r--r-- | tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala b/tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala deleted file mode 100644 index 881c60e..0000000 --- a/tests/src/test/scala/com/softwaremill/sttp/IllTypedTests.scala +++ /dev/null @@ -1,34 +0,0 @@ -package com.softwaremill.sttp - -import org.scalatest.{FlatSpec, Matchers} - -import scala.tools.reflect.ToolBoxError - -class IllTypedTests extends FlatSpec with Matchers { - "compilation" should "fail when trying to stream using the default backend" in { - val thrown = intercept[ToolBoxError] { - EvalScala(""" - import com.softwaremill.sttp._ - import akka.stream.scaladsl.Source - import akka.util.ByteString - implicit val sttpBackend = HttpURLConnectionBackend() - sttp.get(uri"http://example.com").response(asStream[Source[ByteString, Any]]).send() - """) - } - - thrown.getMessage should include( - "could not find implicit value for parameter backend: com.softwaremill.sttp.SttpBackend[R,akka.stream.scaladsl.Source[akka.util.ByteString,Any]]") - } - - "compilation" should "fail when trying to send a request without giving an URL" in { - val thrown = intercept[ToolBoxError] { - EvalScala(""" - import com.softwaremill.sttp._ - implicit val sttpBackend = HttpURLConnectionBackend() - sttp.send() - """) - } - - thrown.getMessage should include("This is a partial request, the method & url are not specified") - } -} |