From d50d56dff229bd7796af5c2b146d917711fdf7f7 Mon Sep 17 00:00:00 2001 From: Jakub Kubrynski Date: Wed, 28 Jan 2015 23:38:07 +0100 Subject: [PATCH] Fixed Invalid null JSON parts processing #4 --- .../io/coderate/accurest/builder/SpockMethodBodyBuilder.groovy | 2 +- accurest-core/src/main/resources/stubs/wiremocks/sample.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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" }