diff --git a/tests/functionaltests/test_muc.c b/tests/functionaltests/test_muc.c index 4acc08ae..18db45ab 100644 --- a/tests/functionaltests/test_muc.c +++ b/tests/functionaltests/test_muc.c @@ -14,10 +14,10 @@ sends_room_join(void** state) prof_input("/join testroom@conference.localhost"); - assert_true(stbbr_last_received( - "" - "" - "" + assert_true(stbbr_received( + "" + "" + "" "")); } @@ -28,10 +28,10 @@ sends_room_join_with_nick(void** state) prof_input("/join testroom@conference.localhost nick testnick"); - assert_true(stbbr_last_received( - "" - "" - "" + assert_true(stbbr_received( + "" + "" + "" "")); } @@ -42,12 +42,12 @@ sends_room_join_with_password(void** state) prof_input("/join testroom@conference.localhost password testpassword"); - assert_true(stbbr_last_received( - "" - "" + assert_true(stbbr_received( + "" + "" "testpassword" "" - "" + "" "")); } @@ -58,12 +58,12 @@ sends_room_join_with_nick_and_password(void** state) prof_input("/join testroom@conference.localhost nick testnick password testpassword"); - assert_true(stbbr_last_received( - "" - "" + assert_true(stbbr_received( + "" + "" "testpassword" "" - "" + "" "")); } @@ -72,7 +72,7 @@ shows_role_and_affiliation_on_join(void** state) { prof_connect(); - stbbr_for_id("prof_join_*", + stbbr_for_id("presence:*", "" "" "" @@ -91,7 +91,7 @@ shows_subject_on_join(void** state) { prof_connect(); - stbbr_for_id("prof_join_*", + stbbr_for_id("presence:*", "" "" "" @@ -109,7 +109,7 @@ shows_subject_on_join(void** state) "anothernick has set the subject to: Test room subject" ""); - assert_true(prof_output_regex("Room subject: .+Test room subject")); + assert_true(prof_output_exact("Room subject: Test room subject")); } void @@ -117,7 +117,7 @@ shows_history_message(void** state) { prof_connect(); - stbbr_for_id("prof_join_*", + stbbr_for_id("presence:*", "" "" "" @@ -136,15 +136,17 @@ shows_history_message(void** state) "" ""); - assert_true(prof_output_regex("testoccupant: an old message")); + assert_true(prof_output_exact("testoccupant: an old message")); } void shows_occupant_join(void** state) { prof_connect(); + prof_input("/presence room all"); + assert_true(prof_output_exact("All presence updates will appear in chat room windows.")); - stbbr_for_id("prof_join_*", + stbbr_for_id("presence:*", "" "" "" @@ -171,7 +173,7 @@ shows_message(void** state) { prof_connect(); - stbbr_for_id("prof_join_*", + stbbr_for_id("presence:*", "" "" "" @@ -188,7 +190,7 @@ shows_message(void** state) "a new message" ""); - assert_true(prof_output_regex("testoccupant: .+a new message")); + assert_true(prof_output_exact("testoccupant: a new message")); } void @@ -196,7 +198,7 @@ shows_me_message_from_occupant(void** state) { prof_connect(); - stbbr_for_id("prof_join_*", + stbbr_for_id("presence:*", "" "" "" @@ -221,7 +223,7 @@ shows_me_message_from_self(void** state) { prof_connect(); - stbbr_for_id("prof_join_*", + stbbr_for_id("presence:*", "" "" "" @@ -246,7 +248,7 @@ shows_all_messages_in_console_when_window_not_focussed(void** state) { prof_connect(); - stbbr_for_id("prof_join_*", + stbbr_for_id("presence:*", "" "" "" @@ -284,7 +286,7 @@ shows_first_message_in_console_when_window_not_focussed(void** state) prof_input("/console muc first"); assert_true(prof_output_exact("Console MUC messages set: first")); - stbbr_for_id("prof_join_*", + stbbr_for_id("presence:*", "" "" "" @@ -304,7 +306,7 @@ shows_first_message_in_console_when_window_not_focussed(void** state) "a new message" ""); - assert_true(prof_output_exact("<< room message: testroom@conference.localhost (win 2)")); + assert_true(prof_output_exact("<< room message: testoccupant in testroom@conference.localhost (win 2)")); prof_input("/clear"); prof_input("/about"); assert_true(prof_output_exact("Type '/help' to show complete help.")); @@ -315,7 +317,7 @@ shows_first_message_in_console_when_window_not_focussed(void** state) ""); prof_timeout(2); - assert_false(prof_output_exact("<< room message: testroom@conference.localhost (win 2)")); + assert_false(prof_output_exact("<< room message: anotheroccupant in testroom@conference.localhost (win 2)")); prof_timeout_reset(); } @@ -327,7 +329,7 @@ shows_no_message_in_console_when_window_not_focussed(void** state) prof_input("/console muc none"); assert_true(prof_output_exact("Console MUC messages set: none")); - stbbr_for_id("prof_join_*", + stbbr_for_id("presence:*", "" "" ""