From 6b8d5f97ede1e963ea42b887dc537dcec28c1e7f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 19 Dec 2018 13:25:15 +0000 Subject: spec/scansion: Add tests for members-only rooms --- spec/scansion/muc_members_only_change.scs | 114 ++++++++++++++++++++++++ spec/scansion/muc_members_only_deregister.scs | 122 ++++++++++++++++++++++++++ 2 files changed, 236 insertions(+) create mode 100644 spec/scansion/muc_members_only_change.scs create mode 100644 spec/scansion/muc_members_only_deregister.scs diff --git a/spec/scansion/muc_members_only_change.scs b/spec/scansion/muc_members_only_change.scs new file mode 100644 index 00000000..3f9dbeee --- /dev/null +++ b/spec/scansion/muc_members_only_change.scs @@ -0,0 +1,114 @@ +# MUC: Room registration and reserved nicknames + +[Client] Romeo + jid: user@localhost + password: password + +[Client] Juliet + jid: user2@localhost + password: password + +----- + +Romeo connects + +Romeo sends: + + + + +Romeo receives: + + + + + + + + +Romeo receives: + + +# Submit config form, set the room to members-only +Romeo sends: + + + + + http://jabber.org/protocol/muc#roomconfig + + + 1 + + + + + +Romeo receives: + + + +# Romeo adds Juliet to the member list +Romeo sends: + + + + + + +Romeo receives: + + + + + + +Romeo receives: + + +# Juliet connects, and joins the room +Juliet connects + +Juliet sends: + + + + +Juliet receives: + + +Juliet receives: + + +Juliet receives: + + +Romeo receives: + + + +# Romeo removes Juliet's membership status +Romeo sends: + + + + + + +# As a non-member, Juliet must now be removed from the room +Romeo receives: + + + + + + + + + +Romeo receives: + + +Romeo disconnects + +Juliet disconnects diff --git a/spec/scansion/muc_members_only_deregister.scs b/spec/scansion/muc_members_only_deregister.scs new file mode 100644 index 00000000..e9a42322 --- /dev/null +++ b/spec/scansion/muc_members_only_deregister.scs @@ -0,0 +1,122 @@ +# MUC: Room registration and reserved nicknames + +[Client] Romeo + jid: user@localhost + password: password + +[Client] Juliet + jid: user2@localhost + password: password + +----- + +Romeo connects + +Romeo sends: + + + + +Romeo receives: + + + + + + + + +Romeo receives: + + +# Submit config form, set the room to members-only +Romeo sends: + + + + + http://jabber.org/protocol/muc#roomconfig + + + 1 + + + + + +Romeo receives: + + + +# Romeo adds Juliet to the member list +Romeo sends: + + + + + + +Romeo receives: + + + + + + +Romeo receives: + + +# Juliet connects, and joins the room +Juliet connects + +Juliet sends: + + + + +Juliet receives: + + +Juliet receives: + + +Juliet receives: + + +Romeo receives: + + + +# Tired of Romeo's company, Juliet unregisters from the room + +Juliet sends: + + + + + + +Juliet receives: + + + + + + + + +Juliet receives: + + +Romeo receives: + + + + + + + + +Romeo disconnects + +Juliet disconnects -- cgit v1.2.3