From 97ffb90f765078aca3e4d6d173a6c93182d9165c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 12 Apr 2018 00:41:57 +0300 Subject: subscription mark all comments read --- juick-www/src/test/java/com/juick/WebAppTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'juick-www/src/test/java/com/juick') diff --git a/juick-www/src/test/java/com/juick/WebAppTests.java b/juick-www/src/test/java/com/juick/WebAppTests.java index 37798d08..4f9f4cc1 100644 --- a/juick-www/src/test/java/com/juick/WebAppTests.java +++ b/juick-www/src/test/java/com/juick/WebAppTests.java @@ -336,10 +336,10 @@ public class WebAppTests { String discussionsUrl = "http://localhost:8080/?show=discuss"; HtmlPage discussions = webClient.getPage(discussionsUrl); assertThat(discussions.querySelectorAll("article").size(), is(0)); - subscriptionService.subscribeMessage(mid, freefd.getUid()); + subscriptionService.subscribeMessage(messagesService.getMessage(mid), freefd); discussions = (HtmlPage) discussions.refresh(); assertThat(discussions.querySelectorAll("article").size(), is(1)); - subscriptionService.subscribeMessage(midNew, freefd.getUid()); + subscriptionService.subscribeMessage(messagesService.getMessage(midNew), freefd); discussions = (HtmlPage) discussions.refresh(); assertThat(discussions.querySelectorAll("article").size(), is(2)); assertThat(discussions.querySelectorAll("article").get(0).getAttributes().getNamedItem("data-mid").getNodeValue(), is(String.valueOf(midNew))); @@ -353,7 +353,7 @@ public class WebAppTests { assertThat(discussionsOld.querySelectorAll("article").get(0).getAttributes().getNamedItem("data-mid").getNodeValue(), is(String.valueOf(midNew))); List newMids = IntStream.rangeClosed(1, 19).map(i -> messagesService.createMessage(ugnich.getUid(), String.valueOf(i), null, null)).boxed().collect(Collectors.toList()); for (Integer m : newMids) { - subscriptionService.subscribeMessage(m, freefd.getUid()); + subscriptionService.subscribeMessage(messagesService.getMessage(m), freefd); } discussions = (HtmlPage) discussions.refresh(); assertThat(discussions.querySelectorAll("article").size(), is(20)); -- cgit v1.2.3