Преглед на файлове

Fix deprecations

Issue gh-4080
Rob Winch преди 9 години
родител
ревизия
17cfd4707b

+ 3 - 3
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());
 	}
 

+ 2 - 2
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());
 	}