From 7e9e549e3d154579ffd40f1299568df78320014e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 13 Dec 2016 17:52:50 +0300 Subject: juick-rss: more rss tests --- juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'juick-rss/src/test') diff --git a/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java b/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java index 8f10f9c3..a9ac848c 100644 --- a/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java +++ b/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java @@ -18,7 +18,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Primary; -import org.springframework.http.MediaType; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; @@ -36,6 +35,7 @@ import static org.mockito.Mockito.when; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.xpath; /** * Created by vitalyster on 13.12.2016. @@ -143,6 +143,7 @@ public class RSSTests { mockMvc.perform( get("/")) .andExpect(status().isOk()) - .andExpect(content().contentType("application/rss+xml")); + .andExpect(content().contentType("application/rss+xml")) + .andExpect(xpath("/rss/channel/description").string("The latest messages at Juick")); } } -- cgit v1.2.3