Fix deprecations

Issue gh-4080
This commit is contained in:
Rob Winch 2016-10-17 09:34:19 -05:00
parent 2c99cd3bbf
commit 17cfd4707b
2 changed files with 5 additions and 5 deletions

View File

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

View File

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