summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-10-28 21:26:45 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-10-29 21:36:08 (GMT)
commit63bc9a94d2a5f69420de831248786f77c8622feb (patch)
treed4b62064c0e67e547ccc9698f17dac8893e66284
parent1bc0b91d81d166d78d73a7ce162213087589cc6b (diff)
downloadswift-63bc9a94d2a5f69420de831248786f77c8622feb.zip
swift-63bc9a94d2a5f69420de831248786f77c8622feb.tar.bz2
Swiften: Fix PubSub.lua test retrieving subscriptions
Change-Id: Ie7a6063c0070c3983119823da19a20d0a64e2ed8
-rw-r--r--Swiften/QA/ScriptedTests/PubSub.lua14
1 files changed, 9 insertions, 5 deletions
diff --git a/Swiften/QA/ScriptedTests/PubSub.lua b/Swiften/QA/ScriptedTests/PubSub.lua
index cb4679a..5ea701c 100644
--- a/Swiften/QA/ScriptedTests/PubSub.lua
+++ b/Swiften/QA/ScriptedTests/PubSub.lua
@@ -60,11 +60,15 @@ function test_entity_use_cases()
-- 5.6 Subscriptions
assert(node:create())
assert(subscriber_node:subscribe({ jid = subscriber_jid }))
- local service_subscriptions = assert(pubsub:get_subscriptions())
- -- FIXME: Doesn't seem to return anything on M-Link. Test this later if this is supposed to work.
- --print(service_subscriptions)
- local node_subscriptions = assert(node:get_subscriptions())
- --print(node_subscriptions)
+ local service_subscriptions = assert(subscriber_pubsub:get_subscriptions())
+ assert(#service_subscriptions == 1)
+ assert(service_subscriptions[1].node == node_id)
+ assert(service_subscriptions[1].jid == subscriber_jid)
+ assert(service_subscriptions[1].subscription == 'subscribed')
+ local node_subscriptions = assert(subscriber_node:get_subscriptions())
+ assert(#node_subscriptions == 1)
+ assert(node_subscriptions[1].jid == subscriber_jid)
+ assert(node_subscriptions[1].subscription == 'subscribed')
assert(node:delete())
-- 5.7 Retrieve affiliations