diff options
author | Vitaly Takmazov | 2022-12-07 16:13:57 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-07 17:38:55 +0300 |
commit | 5e0500933d2f805fe879ced9171c65839c72579b (patch) | |
tree | 60eeb84ac103c3f160dda3c2adbd1a10c489e8ec /src/test/java/com | |
parent | 206742aed99a20fea014c83408fb44ff36089351 (diff) |
Login: use `Referer` header to redirect after the successful login
Diffstat (limited to 'src/test/java/com')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index b40cbc04..367b8e47 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -1959,9 +1959,9 @@ public class ServerTests { Cookie rememberMeFromForm = formLoginResult.getResponse().getCookie("juick-remember-me"); mockMvc.perform(get("/login").cookie(rememberMeFromForm)).andExpect(status().is3xxRedirection()) .andExpect(redirectedUrl("/")); - mockMvc.perform(get("/login?redirect=false").cookie(rememberMeFromForm)) + mockMvc.perform(get("/login?retpath=http://localhost:8080/logged_in").cookie(rememberMeFromForm)) .andExpect(status().is3xxRedirection()) - .andExpect(redirectedUrl("/login/success")); + .andExpect(redirectedUrl("http://localhost:8080/logged_in")); } @Test |