Skip to content

Commit be0cba6

Browse files
committed
[GOV-83] Fix for BI-001
1 parent 7334ce0 commit be0cba6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/test/java/org/mifos/integrationtest/cucumber/stepdef/BillPayStepDef.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void iCallTheGetBillsApiWithBillidWithExpectedStatusOf(int expectedStatus
6969
requestSpec.queryParam("fields","inquiry");
7070
BaseStepDef.response = RestAssured.given(requestSpec).baseUri(billPayConnectorConfig.billPayContactPoint).expect()
7171
.spec(new ResponseSpecBuilder().expectStatusCode(expectedStatus).build()).when()
72-
.get(billPayConnectorConfig.inquiryEndpoint.replace("{billId}",billId)).andReturn().asString();
72+
.get(billPayConnectorConfig.inquiryEndpoint.replace("{billId}",BaseStepDef.billId)).andReturn().asString();
7373

7474
logger.info("Bill Pay response: {}", BaseStepDef.response);
7575
JSONObject jsonObject = new JSONObject(BaseStepDef.response);
@@ -197,10 +197,11 @@ public void iShouldBeAbleToExtractResponseBodyFromCallbackForBillPay() {
197197
}
198198
if(rootNode != null && rootNode.has("billId") && rootNode.get("billId").asText().equals("001")) {
199199
String requestId = null;
200-
if (rootNode.has("requestId")) {
201-
requestId = rootNode.get("requestId").asText();
200+
if (rootNode.has("reason")) {
201+
requestId = rootNode.get("reason").asText();
202202
}
203203
assertThat(requestId).isNotEmpty();
204+
assertThat(requestId).contains("SUCCESSFUL");
204205
String rtpStatus = null;
205206
if (rootNode.has("code")) {
206207
rtpStatus = rootNode.get("code").asText();

0 commit comments

Comments
 (0)