diff --git a/test/src/test/java/org/springframework/security/test/web/servlet/showcase/login/AuthenticationTests.java b/test/src/test/java/org/springframework/security/test/web/servlet/showcase/login/AuthenticationTests.java index 9be521663f..688eae69f7 100644 --- a/test/src/test/java/org/springframework/security/test/web/servlet/showcase/login/AuthenticationTests.java +++ b/test/src/test/java/org/springframework/security/test/web/servlet/showcase/login/AuthenticationTests.java @@ -54,7 +54,7 @@ public class AuthenticationTests { @Test public void requiresAuthentication() throws Exception { - mvc.perform(get("/")).andExpect(status().isMovedTemporarily()); + mvc.perform(get("/")).andExpect(status().isFound()); } @Test @@ -66,7 +66,7 @@ public class AuthenticationTests { @Test public void authenticationSuccess() throws Exception { - mvc.perform(formLogin()).andExpect(status().isMovedTemporarily()) + mvc.perform(formLogin()).andExpect(status().isFound()) .andExpect(redirectedUrl("/")) .andExpect(authenticated().withUsername("user")); } @@ -74,7 +74,7 @@ public class AuthenticationTests { @Test public void authenticationFailed() throws Exception { mvc.perform(formLogin().user("user").password("invalid")) - .andExpect(status().isMovedTemporarily()) + .andExpect(status().isFound()) .andExpect(redirectedUrl("/login?error")).andExpect(unauthenticated()); } diff --git a/test/src/test/java/org/springframework/security/test/web/servlet/showcase/login/CustomConfigAuthenticationTests.java b/test/src/test/java/org/springframework/security/test/web/servlet/showcase/login/CustomConfigAuthenticationTests.java index f9fbb59084..f73067df77 100644 --- a/test/src/test/java/org/springframework/security/test/web/servlet/showcase/login/CustomConfigAuthenticationTests.java +++ b/test/src/test/java/org/springframework/security/test/web/servlet/showcase/login/CustomConfigAuthenticationTests.java @@ -63,7 +63,7 @@ public class CustomConfigAuthenticationTests { public void authenticationSuccess() throws Exception { mvc.perform( formLogin("/authenticate").user("user", "user").password("pass", - "password")).andExpect(status().isMovedTemporarily()) + "password")).andExpect(status().isFound()) .andExpect(redirectedUrl("/")) .andExpect(authenticated().withUsername("user")); } @@ -78,7 +78,7 @@ public class CustomConfigAuthenticationTests { public void authenticationFailed() throws Exception { mvc.perform( formLogin("/authenticate").user("user", "notfound").password("pass", - "invalid")).andExpect(status().isMovedTemporarily()) + "invalid")).andExpect(status().isFound()) .andExpect(redirectedUrl("/authenticate?error")) .andExpect(unauthenticated()); }