From 3799b41149c304721b63c7e36e509cd5865ca9fb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 11 Oct 2019 14:13:57 +0300 Subject: Read Juick hash from Authorization header, drop unused code --- src/test/java/com/juick/server/tests/ServerTests.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/test') 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 -- cgit v1.2.3