summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-06-23 22:50:05 +0200
committerlouiz’ <louiz@louiz.org>2016-06-23 22:50:05 +0200
commit4e959a3869c4a69b9d59de69694644c37380ff11 (patch)
tree674caed8c297ba460dc3e6fb4d73e38483f2a157
parent9206f4723b8c5feb8a96daa9c283d30cf73290e1 (diff)
downloadbiboumi-4e959a3869c4a69b9d59de69694644c37380ff11.tar.gz
biboumi-4e959a3869c4a69b9d59de69694644c37380ff11.tar.bz2
biboumi-4e959a3869c4a69b9d59de69694644c37380ff11.tar.xz
biboumi-4e959a3869c4a69b9d59de69694644c37380ff11.zip
Add a simple e2e test that joins a channel with xep0106-encoded name
-rw-r--r--tests/end_to_end/__main__.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py
index 0e2ca64..7859202 100644
--- a/tests/end_to_end/__main__.py
+++ b/tests/end_to_end/__main__.py
@@ -686,7 +686,22 @@ if __name__ == '__main__':
partial(expect_stanza,
"/message[@from='{lower_nick_two}!{irc_server_one}'][@to='{jid_one}/{resource_one}']"),
]
- )
+ ),
+ Scenario("encoded_channel_join",
+ [
+ handshake_sequence(),
+ partial(send_stanza,
+ "<presence from='{jid_one}/{resource_one}' to='#biboumi\\40louiz.org\\3a80%{irc_server_one}/{nick_one}' />"),
+ connection_sequence("irc.localhost", '{jid_one}/{resource_one}'),
+ partial(expect_stanza,
+ "/message/body[text()='Mode #biboumi@louiz.org:80 [+nt] by {irc_host_one}']"),
+ partial(expect_stanza,
+ ("/presence[@to='{jid_one}/{resource_one}'][@from='#biboumi\\40louiz.org\\3a80%{irc_server_one}/{nick_one}']/muc_user:x/muc_user:item[@affiliation='admin'][@role='moderator']",
+ "/presence/muc_user:x/muc_user:status[@code='110']")
+ ),
+ partial(expect_stanza, "/message[@from='#biboumi\\40louiz.org\\3a80%{irc_server_one}'][@type='groupchat']/subject[not(text())]"),
+ ]),
+
)
failures = 0