diff --git a/accurest-core/src/main/groovy/io/coderate/accurest/builder/SpockMethodBodyBuilder.groovy b/accurest-core/src/main/groovy/io/coderate/accurest/builder/SpockMethodBodyBuilder.groovy index 23fff1791c..75033ba3ff 100644 --- a/accurest-core/src/main/groovy/io/coderate/accurest/builder/SpockMethodBodyBuilder.groovy +++ b/accurest-core/src/main/groovy/io/coderate/accurest/builder/SpockMethodBodyBuilder.groovy @@ -52,7 +52,7 @@ class SpockMethodBodyBuilder { blockBuilder.addLine("responseBody.$it.key == \"$value\"") } } else { - blockBuilder.addLine("responseBody.$it == $value") + blockBuilder.addLine("responseBody.$it.key == $value") } } } diff --git a/accurest-core/src/main/resources/stubs/wiremocks/sample.json b/accurest-core/src/main/resources/stubs/wiremocks/sample.json index f4eca9faad..250e54b85a 100644 --- a/accurest-core/src/main/resources/stubs/wiremocks/sample.json +++ b/accurest-core/src/main/resources/stubs/wiremocks/sample.json @@ -15,7 +15,7 @@ }, "response": { "status": 200, - "body": "{\"loanApplicationStatus\":\"LOAN_APPLIED\",\"loanApplicationId\":\"${123123123:$anyInt($it)}\"}", + "body": "{\"loanApplicationStatus\":\"LOAN_APPLIED\",\"loanApplicationId\":\"${123123123:$anyInt($it)}\",\"rejectionReason\":null}", "headers": { "Content-Type": "application/vnd.loanapplicationservice.v1+json" }