Merge branch '1.1.x' into 1.2.x

This commit is contained in:
Marcin Grzejszczak
2017-12-20 17:12:35 +01:00
2 changed files with 3 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ Contract.make {
{{#response_json_paths_present}}
testMatchers {
{{#response_json_paths}}
jsonPath('{{jsonPath}}', byType())
jsonPath('''{{jsonPath}}''', byType())
{{/response_json_paths}}
}
{{/response_json_paths_present}}

View File

@@ -65,12 +65,13 @@ public class ContractDslSnippetTests {
.accept(MediaType.APPLICATION_PDF)
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON)
.content("{\"foo\": 23 }"))
.content("{\"foo\": 23, \"bar\" : \"baz\" }"))
.andExpect(status().isOk())
.andExpect(content().string("bar"))
// first WireMock
.andDo(WireMockRestDocs.verify()
.jsonPath("$[?(@.foo >= 20)]")
.jsonPath("$[?(@.bar in ['baz','bazz','bazzz'])]")
.contentType(MediaType.valueOf("application/json"))
.stub("shouldGrantABeerIfOldEnough"))
// then Contract DSL documentation