Skip to content

Commit

Permalink
javalite#1046 [ActiveWeb] Show some message on 405 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mppfiles committed Sep 2, 2020
1 parent 9c6a7f4 commit 58367e8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ public void shouldRespond405IfInvalidMethod() throws IOException, ServletExcepti
request.setServletPath("/invalid_method/get");
request.setMethod("POST");
dispatcher.doFilter(request, response, filterChain);
a(response.getContentAsString()).shouldBeEqual("");
a(response.getContentAsString()).shouldBeEqual("405 - Method not allowed");
a(response.getStatus()).shouldBeEqual(405);
a(response.getHeader("Allow")).shouldBeEqual("GET");


request.setServletPath("/invalid_method/get_post");
request.setMethod("PUT");
dispatcher.doFilter(request, response, filterChain);
a(response.getContentAsString()).shouldBeEqual("");
a(response.getContentAsString()).shouldBeEqual("405 - Method not allowed");
a(response.getStatus()).shouldBeEqual(405);
a(response.getHeader("Allow")).shouldBeEqual("GET, POST");
}
Expand Down

0 comments on commit 58367e8

Please sign in to comment.