From a472ce653f1801726f18ca579f8dcffd64ef4d20 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 30 Jan 2014 23:36:24 +0000 Subject: [PATCH] Added muc remove invite test --- tests/test_muc.c | 14 +++++++++++++- tests/test_muc.h | 1 + tests/testsuite.c | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) 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;