summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/QA/ScriptedTests')
-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