Fixed the messaging indents

currently in messaging we were not properly indenting part of the body assertion.
with this change we're fixing that issue

fixes #187
This commit is contained in:
Marcin Grzejszczak
2017-01-13 12:52:02 +01:00
parent bacde76798
commit 6c6f1d3c68
2 changed files with 5 additions and 0 deletions

View File

@@ -81,6 +81,8 @@ abstract class MessagingMethodBodyBuilder extends MethodBodyBuilder {
bb.endBlock()
if (outputMessage.headers) {
bb.addLine(addCommentSignIfRequired('and:')).startBlock()
} else {
bb.startBlock()
}
validateResponseBodyBlock(bb, outputMessage.matchers, outputMessage.body.serverValue)
}

View File

@@ -343,6 +343,9 @@ then:
assertThatJson(parsedJson).field("bookName").isEqualTo("foo");
'''
stripped(test) == stripped(expectedMsg)
and: 'indents are maintained'
test.contains(" ContractVerifierMessage response")
test.contains(" DocumentContext parsedJson")
}
def "should generate tests without headers for Spock"() {