aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/juick/server')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index cc0044b99..0039d3780 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -55,6 +55,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.IteratorUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.Pair;
import org.apache.commons.text.StringEscapeUtils;
import org.junit.After;
import org.junit.Assert;
@@ -2027,7 +2028,13 @@ public class ServerTests {
assertThat(messagesService.getMessageProperty(mid, 0,"tg_id"), is("YO"));
messagesService.setMessageProperty(mid, 0,"tg_id", "YO2");
assertThat(messagesService.getMessageProperty(mid, 0,"tg_id"), is("YO2"));
+ Pair<Integer, Integer> messageId = messagesService.findMessageByProperty("tg_id", "YO2").orElseThrow();
+ assertThat(messageId.getLeft(), is(mid));
messagesService.setMessageProperty(mid, 0, "tg_id", "");
assertThat(messagesService.getMessageProperty(mid, 0,"tg_id"), is(StringUtils.EMPTY));
+ int rid = messagesService.createReply(mid, 0, ugnich, "EOPLE", null);
+ messagesService.setMessageProperty(mid, rid, "tg_id", "hrhr");
+ Pair<Integer, Integer> replyId = messagesService.findMessageByProperty("tg_id", "hrhr").orElseThrow();
+ assertThat(replyId.getRight(), is(rid));
}
}