diff options
author | Kim Alvefur <zash@zash.se> | 2020-03-20 18:52:41 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-03-20 18:52:41 +0100 |
commit | 96f172c685a3073f9ac29560bc95620afb365b47 (patch) | |
tree | 86920904f35dd86a6ab78c0c785909716f238a17 /spec/scansion | |
parent | 494774b629c17ccbe7e4575c3c4114a401d5cc8a (diff) | |
download | prosody-96f172c685a3073f9ac29560bc95620afb365b47.tar.gz prosody-96f172c685a3073f9ac29560bc95620afb365b47.zip |
MUC: Add test for destroying a room by ad-hoc command
Testing ad-hoc commands was not easily doable before 49312378ba1d
relaxed the need for state and an extra roundtrip to execute commands
Diffstat (limited to 'spec/scansion')
-rw-r--r-- | spec/scansion/muc_create_destroy.scs | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/spec/scansion/muc_create_destroy.scs b/spec/scansion/muc_create_destroy.scs index fea759a3..195200bb 100644 --- a/spec/scansion/muc_create_destroy.scs +++ b/spec/scansion/muc_create_destroy.scs @@ -8,6 +8,10 @@ jid: juliet@localhost/lVwkim_k password: password +[Client] Admin + jid: admin@localhost/DfNgg9VE + password: password + ----- Romeo connects @@ -245,6 +249,69 @@ Romeo receives: Juliet disconnects +Romeo sends: + <presence to="elsewhere@conference.localhost/romeo"> + <x xmlns="http://jabber.org/protocol/muc"/> + </presence> + +Romeo receives: + <presence from="elsewhere@conference.localhost/romeo"> + <x xmlns="vcard-temp:x:update"> + <photo/> + </x> + <x xmlns="http://jabber.org/protocol/muc#user"> + <status code="201"/> + <item affiliation="owner" jid="${Romeo's full JID}" role="moderator"/> + <status code="110"/> + </x> + </presence> + +Romeo receives: + <message from="elsewhere@conference.localhost" type="groupchat"> + <subject/> + </message> + +Romeo sends: + <iq to="elsewhere@conference.localhost" id="lx5" type="set"> + <query xmlns="http://jabber.org/protocol/muc#owner"> + <x type="submit" xmlns="jabber:x:data"/> + </query> + </iq> + +Romeo receives: + <iq id="lx5" type="result" from="elsewhere@conference.localhost"/> + +Admin connects + +Admin sends: + <iq id="destroy" type="set" to="conference.localhost"> + <command xmlns="http://jabber.org/protocol/commands" node="http://prosody.im/protocol/muc#destroy"> + <x xmlns="jabber:x:data"> + <field var="rooms"> + <value>elsewhere@conference.localhost</value> + </field> + </x> + </command> + </iq> + +Romeo receives: + <presence from="elsewhere@conference.localhost/romeo" type="unavailable"> + <x xmlns="http://jabber.org/protocol/muc#user"> + <destroy/> + <item affiliation="owner" jid="${Romeo's full JID}" role="none"/> + <status code="110"/> + </x> + </presence> + Romeo disconnects +Admin receives: + <iq id="destroy" type="result" from="conference.localhost"> + <command xmlns="http://jabber.org/protocol/commands" node="http://prosody.im/protocol/muc#destroy" status="completed" sessionid="{scansion:any}"> + <note type="info">The following rooms were destroyed: elsewhere@conference.localhost</note> + </command> + </iq> + +Admin disconnects + # recording ended on 2019-08-31T13:45:32Z |