Skip to content

Commit

Permalink
Add unit test for failure in NcipConfigCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
julianladisch committed Oct 12, 2021
1 parent a096031 commit 6353e10
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/org/folio/ncip/MainVerticleTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.folio.ncip;

import static io.restassured.RestAssured.get;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;

import io.restassured.RestAssured;
Expand Down Expand Up @@ -84,6 +85,16 @@ public void ncipConfigCheck(TestContext ctx) {
}));
}

@Test
public void ncipConfigCheckFailure(TestContext ctx) {
vertx.deployVerticle(new MainVerticle(), success(ctx, y -> {
get("/ncipconfigcheck").
then().
statusCode(500).
body(containsString("localhost:8082"));
}));
}

/**
* Like TestContext.asyncAssertSuccess, but use executeBlocking to run nextHandler
* so that the mock http server can respond.
Expand Down

0 comments on commit 6353e10

Please sign in to comment.