summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2020-04-15 19:35:37 +0200
committerlouiz’ <louiz@louiz.org>2020-04-19 11:41:58 +0200
commit4ee3dd695eb8f80c019290ccb9c4233f9067d3d0 (patch)
tree6ae886767a799010c2cb711595551188f91b10cf /tests
parent1492eed3c915605b2e5a04b719cf7769bc579f87 (diff)
downloadbiboumi-4ee3dd695eb8f80c019290ccb9c4233f9067d3d0.tar.gz
biboumi-4ee3dd695eb8f80c019290ccb9c4233f9067d3d0.tar.bz2
biboumi-4ee3dd695eb8f80c019290ccb9c4233f9067d3d0.tar.xz
biboumi-4ee3dd695eb8f80c019290ccb9c4233f9067d3d0.zip
Demonstrate bug #3429
Diffstat (limited to 'tests')
-rw-r--r--tests/end_to_end/scenarios/nick_change.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/end_to_end/scenarios/nick_change.py b/tests/end_to_end/scenarios/nick_change.py
new file mode 100644
index 0000000..9d06856
--- /dev/null
+++ b/tests/end_to_end/scenarios/nick_change.py
@@ -0,0 +1,33 @@
+from scenarios import *
+
+import scenarios.channel_join_with_two_users
+
+scenario = (
+ scenarios.channel_join_with_two_users.scenario,
+
+ # first users changes their nick
+ send_stanza("<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_three}' id='nick_change' />"),
+ expect_unordered(
+ ["/presence[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_two}/{resource_one}'][@type='unavailable']",
+ "/presence/muc_user:x/muc_user:status[@code='303']",
+ "/presence/muc_user:x/muc_user:item[@affiliation='admin']",
+ "/presence/muc_user:x/muc_user:item[@role='moderator']",
+ "/presence/muc_user:x/muc_user:item[@nick='{nick_three}']"],
+
+ ["/presence[@from='#foo%{irc_server_one}/{nick_one}'][@to='{jid_one}/{resource_one}'][@type='unavailable']",
+ "/presence/muc_user:x/muc_user:status[@code='303']",
+ "/presence/muc_user:x/muc_user:item[@nick='{nick_three}']",
+ "/presence/muc_user:x/muc_user:item[@affiliation='admin']",
+ "/presence/muc_user:x/muc_user:item[@role='moderator']",
+ "/presence/muc_user:x/muc_user:status[@code='110']"],
+
+ ["/presence[@from='#foo%{irc_server_one}/{nick_three}'][@to='{jid_two}/{resource_one}']",
+ "/presence/muc_user:x/muc_user:item[@affiliation='admin']",
+ "/presence/muc_user:x/muc_user:item[@role='moderator']"],
+
+ ["/presence[@from='#foo%{irc_server_one}/{nick_three}'][@to='{jid_one}/{resource_one}']",
+ "/presence/muc_user:x/muc_user:item[@affiliation='admin']",
+ "/presence/muc_user:x/muc_user:item[@role='moderator']",
+ "/presence/muc_user:x/muc_user:status[@code='110']"]
+ ),
+)