about summary refs log tree commit diff stats
path: root/tests/test_muc.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-30 23:49:58 +0000
committerJames Booth <boothj5@gmail.com>2014-01-30 23:49:58 +0000
commit31321077de1dd723bf7713b2906a5786dc5fe29e (patch)
treeb024b5c75de6da8770e74a94a38997a94f0cdab3 /tests/test_muc.c
parent16aecaf01768094ea0c7cfcd0b0ea5c34e5bb037 (diff)
downloadprofani-tty-31321077de1dd723bf7713b2906a5786dc5fe29e.tar.gz
Added muc invite count tests
Diffstat (limited to 'tests/test_muc.c')
-rw-r--r--tests/test_muc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_muc.c b/tests/test_muc.c
index 94acd21c..37570666 100644
--- a/tests/test_muc.c
+++ b/tests/test_muc.c
@@ -36,3 +36,23 @@ void test_muc_remove_invite(void **state)
 
     assert_false(invite_exists);
 }
+
+void test_muc_invite_count_0(void **state)
+{
+    int invite_count = muc_invite_count();
+
+    assert_true(invite_count == 0);
+}
+
+void test_muc_invite_count_5(void **state)
+{
+    muc_add_invite("room1@conf.server");
+    muc_add_invite("room2@conf.server");
+    muc_add_invite("room3@conf.server");
+    muc_add_invite("room4@conf.server");
+    muc_add_invite("room5@conf.server");
+
+    int invite_count = muc_invite_count();
+
+    assert_true(invite_count == 5);
+}