mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 17:06:21 +00:00
Refactored muc_room_is_active to only take room, rather than full jid
This commit is contained in:
@@ -59,23 +59,20 @@ void test_muc_invite_count_5(void **state)
|
||||
|
||||
void test_muc_room_is_not_active(void **state)
|
||||
{
|
||||
Jid *jidp = jid_create("room@server.org/bob");
|
||||
char *room = "room@server.org";
|
||||
|
||||
gboolean room_is_active = muc_room_is_active(jidp);
|
||||
gboolean room_is_active = muc_room_is_active(room);
|
||||
|
||||
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);
|
||||
char *room = "room@server.org";
|
||||
char *nick = "bob";
|
||||
muc_join_room(room, nick);
|
||||
|
||||
gboolean room_is_active = muc_room_is_active(jidp);
|
||||
gboolean room_is_active = muc_room_is_active(room);
|
||||
|
||||
assert_true(room_is_active);
|
||||
|
||||
jid_destroy(jidp);
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ void handle_presence_error_when_nick_conflict_does_not_join_room(void **state)
|
||||
|
||||
handle_presence_error(from, type, err_msg);
|
||||
|
||||
gboolean room_is_active = muc_room_is_active(jidp);
|
||||
gboolean room_is_active = muc_room_is_active(jidp->barejid);
|
||||
assert_false(room_is_active);
|
||||
|
||||
muc_close();
|
||||
|
||||
Reference in New Issue
Block a user