diff options
author | Vitaly Takmazov | 2018-02-05 15:04:08 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-02-05 15:04:08 +0300 |
commit | e372eea0cf03a01d5c1ac3ae230406d7d9de6fd0 (patch) | |
tree | b2e0c50e02bfc128b9c8aebf451f5f73c121988b /juick-www/src | |
parent | 8aa11c92f36a5fd2fbed24e8423c8b9e14efda5f (diff) |
web: setAuthHash for hash login
Diffstat (limited to 'juick-www/src')
-rw-r--r-- | juick-www/src/test/java/com/juick/www/WebAppTests.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/juick-www/src/test/java/com/juick/www/WebAppTests.java b/juick-www/src/test/java/com/juick/www/WebAppTests.java index ef33506c..dcbcb66c 100644 --- a/juick-www/src/test/java/com/juick/www/WebAppTests.java +++ b/juick-www/src/test/java/com/juick/www/WebAppTests.java @@ -308,7 +308,11 @@ public class WebAppTests { @Test public void hashLoginShouldNotUseSession() throws Exception { String hash = userService.getHashByUID(ugnich.getUid()); - MvcResult hashLoginResult = mockMvc.perform(get("/?show=my&hash=" + hash)).andExpect(status().isOk()).andReturn(); + MvcResult hashLoginResult = mockMvc.perform(get("/?show=my&hash=" + hash)) + .andExpect(status().isOk()) + .andExpect(model().attribute("visitor", hasProperty("authHash", equalTo(hash)))) + .andExpect(content().string(containsString(hash))) + .andReturn(); Cookie rememberMeFromHash = hashLoginResult.getResponse().getCookie("juick-remember-me"); MvcResult formLoginResult = mockMvc.perform(post("/login") .param("username", ugnichName) |