From 63bc9a94d2a5f69420de831248786f77c8622feb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Mon, 28 Oct 2013 22:26:45 +0100
Subject: Swiften: Fix PubSub.lua test retrieving subscriptions

Change-Id: Ie7a6063c0070c3983119823da19a20d0a64e2ed8

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
-- 
cgit v0.10.2-6-g49f6