From ae550feea0394bfff147fa1946cfa8c357eacb8a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 2 Oct 2019 00:24:57 +0300 Subject: Fill Message::unread in single query --- src/test/java/com/juick/server/tests/ServerTests.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/test/java/com/juick/server/tests') diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 51be7092..d896565c 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -1000,6 +1000,7 @@ public class ServerTests { assertThat(lastRead.apply(ugnich, mid), is(0)); assertThat(messagesService.getUnread(ugnich).size(), is(1)); assertThat(messagesService.getUnread(ugnich).get(0), is(mid)); + assertThat(messagesService.getMessages(ugnich, Collections.singletonList(mid)).get(0).isUnread(), is(true)); messagesService.getReplies(ugnich, mid); assertThat(lastRead.apply(ugnich, mid), is(1)); assertThat(messagesService.getUnread(ugnich).size(), is(0)); -- cgit v1.2.3