diff options
Diffstat (limited to 'juick-server/src/test')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 5 |
1 files changed, 4 insertions, 1 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 a9cb306b..2644b49c 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,11 +565,14 @@ 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" + + String xml = "<message xmlns=\"jabber:server\" from=\"" + botJid + "\" 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)); + String active = "<message xmlns=\"jabber:server\" from=\"renha@serverstorageisfull.tld/work\" to=\"" + + botJid.asBareJid().toEscapedString() + "\" type=\"chat\" id=\"purple553384c6\"><active xmlns=\"http://jabber.org/protocol/chatstates\"></active></message>"; + result = router.incomingMessage((rocks.xmpp.core.stanza.model.Message)server.parse(active)); xmppMessage.setFrom(botJid); xmppMessage.setTo(botJid.withLocal("pm")); Message pm = new Message(); |