aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick/server/tests
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-11-29 10:23:04 +0300
committerGravatar Vitaly Takmazov2018-11-29 10:23:04 +0300
commit55cf2dd357088d7bbe0efff6a483679301ab2c22 (patch)
treeda28f282204eda9ebc41a1c5eda553d343ad3bf2 /src/test/java/com/juick/server/tests
parentaf4ab437d158faec8db8c62bfd88c27dd4f59c8a (diff)
XMPP PMs refactoring
Diffstat (limited to 'src/test/java/com/juick/server/tests')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java7
1 files changed, 6 insertions, 1 deletions
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 = "<message xmlns=\"jabber:server\" from=\"" + botJid + "\" to=\"renha@serverstorageisfull.tld\" type=\"chat\"><body>@yo:\n" +
"343432434\n" +
"\n" +