From 23842e5254f91ebecac37ceea6a28a240accae24 Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 31 Jan 2014 00:10:28 +0000 Subject: Added muc room active tests --- tests/test_muc.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests/test_muc.c') diff --git a/tests/test_muc.c b/tests/test_muc.c index 37570666..ba4fef1d 100644 --- a/tests/test_muc.c +++ b/tests/test_muc.c @@ -56,3 +56,26 @@ void test_muc_invite_count_5(void **state) assert_true(invite_count == 5); } + +void test_muc_room_is_not_active(void **state) +{ + Jid *jidp = jid_create("room@server.org/bob"); + + gboolean room_is_active = muc_room_is_active(jidp); + + assert_false(room_is_active); + + jid_destroy(jidp); +} + +void test_muc_room_is_active(void **state) +{ + Jid *jidp = jid_create("room@server.org/bob"); + muc_join_room(jidp->barejid, jidp->resourcepart); + + gboolean room_is_active = muc_room_is_active(jidp); + + assert_true(room_is_active); + + jid_destroy(jidp); +} -- cgit 1.4.1-2-gfad0