Skip to content

Commit

Permalink
Fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoyanchev committed Feb 28, 2022
1 parent b045e5b commit c03def7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void responseStatusExceptionWithHeaders() {

ModelAndView mav = exceptionResolver.resolveException(request, response, null, ex);

assertResolved(mav, 405, "Request method 'GET' not supported");
assertResolved(mav, 405, "Request method 'GET' is not supported.");
assertThat(response.getHeader(HttpHeaders.ALLOW)).isEqualTo("POST,PUT");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void handleMissingPathVariable() throws NoSuchMethodException {
assertThat(mav).as("No ModelAndView returned").isNotNull();
assertThat(mav.isEmpty()).as("No Empty ModelAndView returned").isTrue();
assertThat(response.getStatus()).as("Invalid status code").isEqualTo(500);
assertThat(response.getErrorMessage()).isEqualTo("Required URI variable 'foo' is not present");
assertThat(response.getErrorMessage()).isEqualTo("Required path variable 'foo' is not present.");
}

@Test
Expand All @@ -123,7 +123,7 @@ public void handleMissingServletRequestParameter() {
assertThat(mav).as("No ModelAndView returned").isNotNull();
assertThat(mav.isEmpty()).as("No Empty ModelAndView returned").isTrue();
assertThat(response.getStatus()).as("Invalid status code").isEqualTo(400);
assertThat(response.getErrorMessage()).isEqualTo("Required parameter 'foo' is not present");
assertThat(response.getErrorMessage()).isEqualTo("Required parameter 'foo' is not present.");
}

@Test
Expand Down Expand Up @@ -183,7 +183,7 @@ public void handleMissingServletRequestPartException() throws Exception {
assertThat(mav).as("No ModelAndView returned").isNotNull();
assertThat(mav.isEmpty()).as("No Empty ModelAndView returned").isTrue();
assertThat(response.getStatus()).as("Invalid status code").isEqualTo(400);
assertThat(response.getErrorMessage().contains("request part")).isTrue();
assertThat(response.getErrorMessage().contains("part")).isTrue();
assertThat(response.getErrorMessage().contains("name")).isTrue();
assertThat(response.getErrorMessage().contains("not present")).isTrue();
}
Expand Down

0 comments on commit c03def7

Please sign in to comment.