From c61e9d80ea7724c141d7dc8610b3c3ca6b46f24b Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 20 Dec 2015 02:42:11 +0000 Subject: Added more muc functional tests --- tests/functionaltests/test_muc.c | 89 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 2 deletions(-) (limited to 'tests/functionaltests/test_muc.c') diff --git a/tests/functionaltests/test_muc.c b/tests/functionaltests/test_muc.c index 83e383be..5911209e 100644 --- a/tests/functionaltests/test_muc.c +++ b/tests/functionaltests/test_muc.c @@ -91,7 +91,7 @@ sends_room_join_with_nick_and_password(void **state) } void -show_role_and_affiliation_on_join(void **state) +shows_role_and_affiliation_on_join(void **state) { prof_connect(); @@ -111,7 +111,7 @@ show_role_and_affiliation_on_join(void **state) } void -show_subject_on_join(void **state) +shows_subject_on_join(void **state) { prof_connect(); @@ -137,3 +137,88 @@ show_subject_on_join(void **state) assert_true(prof_output_regex("Room subject: .+Test room subject")); } + +void +shows_history_message(void **state) +{ + prof_connect(); + + stbbr_for_id("prof_join_2", + "" + "" + "" + "" + "" + "" + "" + ); + + prof_input("/join testroom@conference.localhost"); + assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none")); + + stbbr_send( + "" + "an old message" + "" + "" + "" + ); + + assert_true(prof_output_regex("testoccupant: an old message")); +} + +void +shows_occupant_join(void **state) +{ + prof_connect(); + + stbbr_for_id("prof_join_2", + "" + "" + "" + "" + "" + "" + "" + ); + + prof_input("/join testroom@conference.localhost"); + assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none")); + + stbbr_send( + "" + "" + "" + "" + "" + ); + + assert_true(prof_output_exact("-> testoccupant has joined the room, role: participant, affiliation: none")); +} + +void +shows_message(void **state) +{ + prof_connect(); + + stbbr_for_id("prof_join_2", + "" + "" + "" + "" + "" + "" + "" + ); + + prof_input("/join testroom@conference.localhost"); + assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none")); + + stbbr_send( + "" + "a new message" + "" + ); + + assert_true(prof_output_regex("testoccupant: .+a new message")); +} -- cgit 1.4.1-2-gfad0