Skip to content

Commit

Permalink
Fix Octoclient specs
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydmeta committed Jul 3, 2017
1 parent 4bddb66 commit 4bf01b4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4bf01b4

Please sign in to comment.