From 4bf01b445aa5c0b86d0453a88972c213e0b5e51a Mon Sep 17 00:00:00 2001 From: Lloyd Date: Mon, 3 Jul 2017 14:22:02 +0900 Subject: [PATCH] Fix Octoclient specs --- .../src/test/scala/com/m3/octoparts/ws/OctoClientSpec.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scala-ws-client/src/test/scala/com/m3/octoparts/ws/OctoClientSpec.scala b/scala-ws-client/src/test/scala/com/m3/octoparts/ws/OctoClientSpec.scala index ef9cb1ed..9397df23 100644 --- a/scala-ws-client/src/test/scala/com/m3/octoparts/ws/OctoClientSpec.scala +++ b/scala-ws-client/src/test/scala/com/m3/octoparts/ws/OctoClientSpec.scala @@ -40,6 +40,9 @@ class OctoClientSpec def jsonAsWSResponse(js: JsValue): AhcWSResponse = { val mockWSResp = mock[AhcWSResponse] when(mockWSResp.body[JsValue]).thenReturn(js) + // .json is deprecated on AhcWSResponse but not on WSResponse. + // do a cast here for clarity. + when(mockWSResp.asInstanceOf[WSResponse].json).thenReturn(js) when(mockWSResp.status).thenReturn(200) mockWSResp }