diff options
Diffstat (limited to 'juick-server/src/test/java/com/juick/server')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java index 3e17ebce7..a9cb306b4 100644 --- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java +++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java @@ -565,6 +565,11 @@ public class ServerTests { xmppMessage.setBody("What's up?"); result = router.incomingMessage(xmppMessage); assertThat(result.getBody(), startsWith("Private message sent")); + String xml = "<message xmlns=\"jabber:server\" from=\"juick@localhost\" to=\"renha@serverstorageisfull.tld\" type=\"chat\"><body>@yo:\n" + + "343432434\n" + + "\n" + + "#2 http://juick.com/2</body><thread>juick-2</thread><juick xmlns=\"http://juick.com/message\" mid=\"2\" privacy=\"1\" quote=\"\" replyto=\"0\" rid=\"0\" ts=\"2018-04-10 06:58:23\"><body>343432434</body><updated></updated><user xmlns=\"http://juick.com/user\" uname=\"yo\" uid=\"2\"></user></juick><nick xmlns=\"http://jabber.org/protocol/nick\">@yo</nick></message>"; + result = router.incomingMessage((rocks.xmpp.core.stanza.model.Message)server.parse(xml)); xmppMessage.setFrom(botJid); xmppMessage.setTo(botJid.withLocal("pm")); Message pm = new Message(); |