WireMock RestDocs stub() method is a no-op

deprecating the method and going towards document()
fix by @dsyer

fixes gh-1092
This commit is contained in:
Marcin Grzejszczak
2019-11-05 14:03:22 +01:00
parent 4e375b99e1
commit 380d2535bd
9 changed files with 48 additions and 28 deletions

View File

@@ -269,8 +269,8 @@ public class ApplicationTests {
mockMvc.perform(post("/resource")
.content("{\"id\":\"123456\",\"message\":\"Hello World\"}"))
.andExpect(status().isOk())
.andDo(verify().jsonPath("$.id")
.stub("resource"));
.andDo(verify().jsonPath("$.id"))
.andDo(document("resource"));
}
}
----
@@ -295,8 +295,8 @@ following example:
.andDo(verify()
.wiremock(WireMock.post(
urlPathEquals("/resource"))
.withRequestBody(matchingJsonPath("$.id"))
.stub("post-resource"));
.withRequestBody(matchingJsonPath("$.id")))
.andDo(document("post-resource"));
}
----