summaryrefslogtreecommitdiff
path: root/tests/end_to_end
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-06-17 15:16:49 +0200
committerlouiz’ <louiz@louiz.org>2018-06-17 15:16:49 +0200
commit2f0e26db4cd91037463e5aa45c7538a942a9eee2 (patch)
treea06a8d0876f70fc9dc388fc7c3a81f5e434aeccd /tests/end_to_end
parent354c738dc3cacd302d6961617fbc69e128572470 (diff)
downloadbiboumi-2f0e26db4cd91037463e5aa45c7538a942a9eee2.tar.gz
biboumi-2f0e26db4cd91037463e5aa45c7538a942a9eee2.tar.bz2
biboumi-2f0e26db4cd91037463e5aa45c7538a942a9eee2.tar.xz
biboumi-2f0e26db4cd91037463e5aa45c7538a942a9eee2.zip
Channels’ disco#info includes the number of participants
fix #3311
Diffstat (limited to 'tests/end_to_end')
-rw-r--r--tests/end_to_end/__main__.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py
index a9909f5..5611e8d 100644
--- a/tests/end_to_end/__main__.py
+++ b/tests/end_to_end/__main__.py
@@ -2693,6 +2693,27 @@ if __name__ == '__main__':
"/iq/disco_info:query/disco_info:feature[@var='urn:xmpp:ping']",
"/iq/disco_info:query/disco_info:feature[@var='urn:xmpp:mam:2']",
"/iq/disco_info:query/disco_info:feature[@var='jabber:iq:version']",
+ "!/iq/disco_info:query/dataform:x/dataform:field[@var='muc#roominfo_occupants']"
+ )),
+
+ # Join the channel, and re-do the same query
+ partial(send_stanza,
+ "<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"),
+ connection_sequence("irc.localhost", '{jid_one}/{resource_one}'),
+ partial(expect_stanza,
+ "/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"),
+ partial(expect_stanza,
+ ("/presence[@to='{jid_one}/{resource_one}'][@from='#foo%{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='#foo%{irc_server_one}'][@type='groupchat']/subject[not(text())]"),
+
+ partial(send_stanza,
+ "<iq from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' id='2' type='get'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>"),
+ partial(expect_stanza,
+ ("/iq[@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}'][@type='result']/disco_info:query",
+ "/iq/disco_info:query/dataform:x/dataform:field[@var='muc#roominfo_occupants']/dataform:value[text()='1']",
+ "/iq/disco_info:query/dataform:x/dataform:field[@var='FORM_TYPE'][@type='hidden']/dataform:value[text()='http://jabber.org/protocol/muc#roominfo']"
)),
]),
Scenario("fixed_muc_disco_info",