aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/scala
diff options
context:
space:
mode:
authorPaweł Stawicki <pawelstawicki@gmail.com>2018-01-28 09:42:58 +0100
committerPaweł Stawicki <pawelstawicki@gmail.com>2018-01-28 09:46:19 +0100
commit2cd4df4de975c45d566bc1304abc699b80023533 (patch)
tree2758f152b267eac6b240ba99b8e172ddd6acb308 /core/src/test/scala
parent9da3ff4fd8fc76772b365b1368d335d1722f007b (diff)
downloadsttp-2cd4df4de975c45d566bc1304abc699b80023533.tar.gz
sttp-2cd4df4de975c45d566bc1304abc699b80023533.tar.bz2
sttp-2cd4df4de975c45d566bc1304abc699b80023533.zip
Added back the thenRespond(resp: => Response) method
Diffstat (limited to 'core/src/test/scala')
-rw-r--r--core/src/test/scala/com/softwaremill/sttp/testing/SttpBackendStubTests.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/test/scala/com/softwaremill/sttp/testing/SttpBackendStubTests.scala b/core/src/test/scala/com/softwaremill/sttp/testing/SttpBackendStubTests.scala
index fbf7a0b..9a435b2 100644
--- a/core/src/test/scala/com/softwaremill/sttp/testing/SttpBackendStubTests.scala
+++ b/core/src/test/scala/com/softwaremill/sttp/testing/SttpBackendStubTests.scala
@@ -79,7 +79,7 @@ class SttpBackendStubTests extends FlatSpec with Matchers with ScalaFutures {
it should "handle exceptions thrown instead of a response (synchronous)" in {
implicit val s = SttpBackendStub(HttpURLConnectionBackend())
.whenRequestMatches(_ => true)
- .thenRespondWithMonad(throw new TimeoutException())
+ .thenRespond(throw new TimeoutException())
a[TimeoutException] should be thrownBy {
sttp.get(uri"http://example.org").send()
@@ -89,7 +89,7 @@ class SttpBackendStubTests extends FlatSpec with Matchers with ScalaFutures {
it should "handle exceptions thrown instead of a response (asynchronous)" in {
implicit val s = SttpBackendStub(new FutureMonad())
.whenRequestMatches(_ => true)
- .thenRespondWithMonad(throw new TimeoutException())
+ .thenRespond(throw new TimeoutException())
val result = sttp.get(uri"http://example.org").send()
result.failed.futureValue shouldBe a[TimeoutException]