aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-10-11 14:13:57 +0300
committerGravatar Vitaly Takmazov2019-10-11 15:21:14 +0300
commit3799b41149c304721b63c7e36e509cd5865ca9fb (patch)
tree796f91a294991ea487390da7f92ea3caff935fe6 /src/test/java/com/juick
parent36e49df53a4d79bf4dc8e5594fc319d641b461c8 (diff)
Read Juick hash from Authorization header, drop unused code
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java7
1 files changed, 5 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 d896565c..644ff096 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -523,12 +523,15 @@ public class ServerTests {
mockMvc.perform(
get("/api/home")
.with(httpBasic(ugnichName, ugnichPassword)))
- .andExpect(status().isOk())
- .andReturn();
+ .andExpect(status().isOk());
mockMvc.perform(get("/api/home")
.param("hash", ugnichHash))
.andExpect(status().isOk());
+
+ mockMvc.perform(get("/api/home")
+ .header("Authorization", String.format("Juick %s", ugnichHash)))
+ .andExpect(status().isOk());
}
@Test