Skip to content

Commit

Permalink
fix(qa): fix error page test to be consistant for all supported AS
Browse files Browse the repository at this point in the history
* remove shouldCheckInternalServerErrorResponse as it relies on
behaviour which could be changed in the future
* adjust response type assertion

Related to CAM-10557
  • Loading branch information
yanavasileva committed Jul 17, 2019
1 parent d89d86b commit 242f938
Showing 1 changed file with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void shouldCheckNonFoundResponse() {

// then
assertEquals(Status.NOT_FOUND.getStatusCode(), response.getStatus());
assertEquals(MediaType.TEXT_HTML, response.getType().toString());
assertTrue(response.getType().toString().startsWith(MediaType.TEXT_HTML));
String responseEntity = response.getEntity(String.class);
assertTrue(responseEntity.contains("Camunda"));
assertTrue(responseEntity.contains("Not Found"));
Expand All @@ -51,21 +51,4 @@ public void shouldCheckNonFoundResponse() {
response.close();
}

@Test
public void shouldCheckInternalServerErrorResponse() {
// when
ClientResponse response = client.resource(APP_BASE_PATH + "app/adminX/default")
.get(ClientResponse.class);

// then
assertEquals(Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatus());
assertEquals(MediaType.TEXT_HTML, response.getType().toString());
String responceEntity = response.getEntity(String.class);
assertTrue(responceEntity.contains("Camunda"));
assertTrue(responceEntity.contains("Internal Server Error"));

// cleanup
response.close();
}

}

0 comments on commit 242f938

Please sign in to comment.