aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src/test/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-01 19:18:03 +0300
committerGravatar Vitaly Takmazov2018-03-01 19:49:10 +0300
commit70a50b2252ed313e3aee1a9ee2f33be8a46cb028 (patch)
treecf1f15f826ef21f2f431e242b9db50b9bcbf3dbf /juick-server-jdbc/src/test/java
parentf92fb49bfab851d6de2480cf0359920516bfe050 (diff)
sort discussions by last replay date
Diffstat (limited to 'juick-server-jdbc/src/test/java')
-rw-r--r--juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java b/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java
index bdb9cdcb..4ebfe056 100644
--- a/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java
+++ b/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java
@@ -35,6 +35,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import javax.inject.Inject;
import java.sql.Timestamp;
import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -164,6 +166,8 @@ public class MessageServiceTest extends AbstractJUnit4SpringContextTests {
assertEquals(-1, userService.checkPassword(ugnich.getName(), "xy"));
subscriptionService.subscribeMessage(msg.getMid(), ugnich.getUid());
assertEquals(1, subscriptionService.getUsersSubscribedToComments(msg.getMid(), user.getUid()).size());
+ assertThat(messagesService.getDiscussions(ugnich.getUid(), Instant.now().toEpochMilli()).get(0),
+ equalTo(msg.getMid()));
messagesService.deleteMessage(user_id, mid);
messagesService.deleteMessage(user_id, mid2);
String htmlTagName = ">_<";