use of org.craftercms.security.exception.AuthenticationException in project profile by craftercms.
the class LoginFailureHandlerImplTest method testSendError.
@Test
public void testSendError() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
RequestContext context = new RequestContext(request, response, null);
handler.handle(context, new AuthenticationException());
assertEquals(HttpServletResponse.SC_UNAUTHORIZED, response.getStatus());
assertTrue(response.isCommitted());
}
Aggregations