spec/scansion/basic_roster.scs: Add tests for actually modifying the roster
authorMatthew Wild <mwild1@gmail.com>
Thu, 13 Sep 2018 16:18:59 +0100
changeset 9308 f14c81fd44a4
parent 9307 0616412409c5
child 9309 35c128b42509
spec/scansion/basic_roster.scs: Add tests for actually modifying the roster
spec/scansion/basic_roster.scs
--- a/spec/scansion/basic_roster.scs	Thu Sep 13 16:17:46 2018 +0100
+++ b/spec/scansion/basic_roster.scs	Thu Sep 13 16:18:59 2018 +0100
@@ -30,12 +30,44 @@
 		<query ver='{scansion:any}' xmlns="jabber:iq:roster"/>
 	</iq>
 
-Romeo disconnects
+# Add nurse to roster
+
+Romeo sends:
+	<iq type="set" id="roster2">
+		<query xmlns="jabber:iq:roster">
+			<item jid='nurse@localhost'/>
+		</query>
+	</iq>
+
+# Receive the roster add result
+
+Romeo receives:
+	<iq type="result" id="roster2"/>
+
+# Receive the roster push
 
-#Juliet receives:
-#	<presence from="${Romeo's full JID}" />
-#
-#Juliet receives:
-#	<presence from="${Romeo's full JID}" type="unavailable" />
-#
-#Juliet disconnects
+Romeo receives:
+	<iq type="set" id="{scansion:any}">
+		<query xmlns='jabber:iq:roster' ver='{scansion:any}'>
+			<item jid='nurse@localhost' subscription='none'/>
+		</query>
+	</iq>
+
+Romeo sends:
+	<iq type="result" id="fixme"/>
+
+# Fetch the roster, it should include nurse now
+
+Romeo sends:
+	<iq type="get" id="roster3">
+		<query xmlns='jabber:iq:roster'/>
+	</iq>
+
+Romeo receives:
+	<iq type="result" id="roster3">
+		<query xmlns='jabber:iq:roster' ver="{scansion:any}">
+			<item subscription='none' jid='nurse@localhost'/>
+		</query>
+	</iq>
+
+Romeo disconnects