aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-29 11:33:37 +0300
committerGravatar Vitaly Takmazov2019-04-29 11:33:37 +0300
commitdb25e044786dc98aaa4e56700d4bbddb7d97ca2e (patch)
tree974fae4dbaaca67f1232e622c6e7df6701552092 /src/test
parent57bbef026ee44c0e52680f4bb101df6fa6431303 (diff)
rss test
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java13
1 files changed, 13 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 770c7e7c..be077e00 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -2052,4 +2052,17 @@ public class ServerTests {
mockMvc.perform(get("/api/notifications")).andExpect(status().isUnauthorized());
mockMvc.perform(delete("/api/notifications")).andExpect(status().isUnauthorized());
}
+ @Test
+ public void rssFeeds() throws Exception {
+ mockMvc.perform(get("/rss/ugnich/blog")
+ .accept(MediaType.TEXT_XML))
+ .andExpect(status().isOk());
+ // fallback
+ mockMvc.perform(get("/rss/ugnich/blog")
+ .header("Accept",
+ "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;" +
+ "q=0.8,application/signed-exchange;v=b3"))
+ .andExpect(status().isOk())
+ .andExpect(content().contentType("application/rss+xml;charset=UTF-8"));
+ }
}