We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simply remove the second factor part from mfaWhenWrongCodeThenRedirects and the test fails:
mfaWhenWrongCodeThenRedirects
@Test void mfaWhenSecondFactorSkippedThenRedirects() throws Exception { // @formatter:off MvcResult result = this.mockMvc.perform(formLogin() .user("[email protected]") .password("password")) .andExpect(redirectedUrl("/second-factor")) .andReturn(); HttpSession session = result.getRequest().getSession(); // skip the second factor this.mockMvc.perform(post("/third-factor") .session((MockHttpSession) session) .param("answer", "smith") .with(csrf())) .andExpect(redirectedUrl("/login?error")); // @formatter:on }
Test output:
Redirected URL expected:</login?error> but was:</> Expected :/login?error Actual :/
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Simply remove the second factor part from
mfaWhenWrongCodeThenRedirects
and the test fails:Test output:
The text was updated successfully, but these errors were encountered: