summaryrefslogtreecommitdiff
path: root/tests/end_to_end/scenarios/slash_me_channel_message.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/end_to_end/scenarios/slash_me_channel_message.py')
-rw-r--r--tests/end_to_end/scenarios/slash_me_channel_message.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/end_to_end/scenarios/slash_me_channel_message.py b/tests/end_to_end/scenarios/slash_me_channel_message.py
new file mode 100644
index 0000000..d30fba3
--- /dev/null
+++ b/tests/end_to_end/scenarios/slash_me_channel_message.py
@@ -0,0 +1,18 @@
+from scenarios import *
+
+scenario = (
+ scenarios.channel_join_with_two_users.scenario,
+ # Send a channel message
+ send_stanza("<message from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' type='groupchat'><body>/me rit en IRC</body></message>"),
+ # Receive the message, forwarded to the two users
+ expect_unordered(
+ [
+ "/message[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_one}/{resource_one}'][@type='groupchat']/body[text()='/me rit en IRC']",
+ "/message/stable_id:stanza-id[@by='#foo%{irc_server_one}'][@id]"
+ ],
+ [
+ "/message[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_two}/{resource_one}'][@type='groupchat']/body[text()='/me rit en IRC']",
+ "/message/stable_id:stanza-id[@by='#foo%{irc_server_one}'][@id]"
+ ],
+ ),
+)