aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-12-12 09:19:53 +0300
committerGravatar Vitaly Takmazov2018-12-12 09:19:53 +0300
commit1dc570a8aaaa8657eb4faa7283e30a5fde93d321 (patch)
tree115c5b3e11f893dcfeac6c9caa7023c7219ba4ef /src/test/java/com/juick
parentae5870f1fa9bbf045f1881664bb8a3a098fd2610 (diff)
Vary: Accept-Language
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index b732cb98..b914aed0 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -1877,4 +1877,16 @@ public class ServerTests {
String newHash = DigestUtils.md5DigestAsHex(newAvatarData);
assertThat(webApp.getAvatarUrl(userService.getUserByName(freefdName)), is(String.format("http://localhost:8080/i/a/%d-%s.png", freefd.getUid(), newHash)));
}
+ @Test
+ public void varyMvcResponse() throws Exception {
+ mockMvc.perform(get("/"))
+ .andExpect(status().isOk())
+ .andExpect(header().string("Vary", "Accept-Language"));
+ mockMvc.perform(get("/rss/ugnich/blog"))
+ .andExpect(status().isOk())
+ .andExpect(header().string("Vary", "Accept-Language"));
+ mockMvc.perform(get("/api/messages"))
+ .andExpect(status().isOk())
+ .andExpect(header().string("Vary", "Accept-Language"));
+ }
}