diff --git a/tests/test_muc.c b/tests/test_muc.c index 42a27931..3a8da50a 100644 --- a/tests/test_muc.c +++ b/tests/test_muc.c @@ -11,8 +11,20 @@ void test_muc_add_invite(void **state) char *room = "room@conf.server"; muc_init(); muc_add_invite(room); - + gboolean invite_exists = muc_invites_include(room); assert_true(invite_exists); } + +void test_muc_remove_invite(void **state) +{ + char *room = "room@conf.server"; + muc_init(); + muc_add_invite(room); + muc_remove_invite(room); + + gboolean invite_exists = muc_invites_include(room); + + assert_false(invite_exists); +} diff --git a/tests/test_muc.h b/tests/test_muc.h index 8efff108..8f0a879b 100644 --- a/tests/test_muc.h +++ b/tests/test_muc.h @@ -1 +1,2 @@ void test_muc_add_invite(void **state); +void test_muc_remove_invite(void **state); diff --git a/tests/testsuite.c b/tests/testsuite.c index 5120bcf2..e823acd3 100644 --- a/tests/testsuite.c +++ b/tests/testsuite.c @@ -430,6 +430,7 @@ int main(int argc, char* argv[]) { const UnitTest muc_tests[] = { unit_test(test_muc_add_invite), + unit_test(test_muc_remove_invite), }; int bak, bak2, new;