File tree 1 file changed +4
-3
lines changed
src/test/java/org/mifos/integrationtest/cucumber/stepdef
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public void iCallTheGetBillsApiWithBillidWithExpectedStatusOf(int expectedStatus
69
69
requestSpec .queryParam ("fields" ,"inquiry" );
70
70
BaseStepDef .response = RestAssured .given (requestSpec ).baseUri (billPayConnectorConfig .billPayContactPoint ).expect ()
71
71
.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 ();
73
73
74
74
logger .info ("Bill Pay response: {}" , BaseStepDef .response );
75
75
JSONObject jsonObject = new JSONObject (BaseStepDef .response );
@@ -197,10 +197,11 @@ public void iShouldBeAbleToExtractResponseBodyFromCallbackForBillPay() {
197
197
}
198
198
if (rootNode != null && rootNode .has ("billId" ) && rootNode .get ("billId" ).asText ().equals ("001" )) {
199
199
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 ();
202
202
}
203
203
assertThat (requestId ).isNotEmpty ();
204
+ assertThat (requestId ).contains ("SUCCESSFUL" );
204
205
String rtpStatus = null ;
205
206
if (rootNode .has ("code" )) {
206
207
rtpStatus = rootNode .get ("code" ).asText ();
You can’t perform that action at this time.
0 commit comments