From db25e044786dc98aaa4e56700d4bbddb7d97ca2e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 29 Apr 2019 11:33:37 +0300 Subject: rss test --- src/test/java/com/juick/server/tests/ServerTests.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/test/java/com') 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")); + } } -- cgit v1.2.3