aboutsummaryrefslogtreecommitdiffstats
path: root/spec/scansion/basic_roster.scs
blob: 2e292083a5f8d02cf1361d862575ce1ef6fd1d81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Basic roster test

[Client] Romeo
	jid: user@localhost
	password: password

[Client] Juliet
	jid: juliet@localhost
	password: password

---------

Romeo connects

Juliet connects

Romeo sends:
	<presence/>

Romeo receives:
	<presence from="${Romeo's full JID}" />

Romeo sends:
	<iq type="get" id="roster1">
		<query xmlns='jabber:iq:roster'/>
	</iq>

Romeo receives:
	<iq type="result" id="roster1">
		<query ver='{scansion:any}' xmlns="jabber:iq:roster"/>
	</iq>

# 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

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