1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Added muc remove invite test

This commit is contained in:
James Booth 2014-01-30 23:36:24 +00:00
parent 63b3299b06
commit a472ce653f
3 changed files with 15 additions and 1 deletions

View File

@ -11,8 +11,20 @@ void test_muc_add_invite(void **state)
char *room = "room@conf.server"; char *room = "room@conf.server";
muc_init(); muc_init();
muc_add_invite(room); muc_add_invite(room);
gboolean invite_exists = muc_invites_include(room); gboolean invite_exists = muc_invites_include(room);
assert_true(invite_exists); 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);
}

View File

@ -1 +1,2 @@
void test_muc_add_invite(void **state); void test_muc_add_invite(void **state);
void test_muc_remove_invite(void **state);

View File

@ -430,6 +430,7 @@ int main(int argc, char* argv[]) {
const UnitTest muc_tests[] = { const UnitTest muc_tests[] = {
unit_test(test_muc_add_invite), unit_test(test_muc_add_invite),
unit_test(test_muc_remove_invite),
}; };
int bak, bak2, new; int bak, bak2, new;