diff options
author | James Booth <boothj5@gmail.com> | 2014-01-31 00:10:28 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-01-31 00:10:28 +0000 |
commit | 23842e5254f91ebecac37ceea6a28a240accae24 (patch) | |
tree | feb4db2bdac1993b8962fe737e0e976772eee7aa /tests/test_muc.c | |
parent | 31321077de1dd723bf7713b2906a5786dc5fe29e (diff) | |
download | profani-tty-23842e5254f91ebecac37ceea6a28a240accae24.tar.gz |
Added muc room active tests
Diffstat (limited to 'tests/test_muc.c')
-rw-r--r-- | tests/test_muc.c | 23 |
1 files changed, 23 insertions, 0 deletions
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); +} |