From 55cf2dd357088d7bbe0efff6a483679301ab2c22 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 29 Nov 2018 10:23:04 +0300 Subject: XMPP PMs refactoring --- src/test/java/com/juick/server/tests/ServerTests.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/test/java/com') diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 7c038058..09b7d4dd 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -713,7 +713,12 @@ public class ServerTests { xmppMessage.setTo(botJid.withLocal("secretlysad")); xmppMessage.setBody("What's up?"); result = router.incomingMessage(xmppMessage); - assertThat(result.getBody(), startsWith("Private message sent")); + assertThat(result, is(nullValue())); + xmppMessage.setTo(botJid); + xmppMessage.setBody("@secretlysad Hey!"); + result = router.incomingMessage(xmppMessage); + assertThat(result.getBody(), is("Private message sent")); + assertThat(pmQueriesService.getPMMessages(renhaId, secretlySadId).size(), is(2)); String xml = "@yo:\n" + "343432434\n" + "\n" + -- cgit v1.2.3