diff --git a/tests/functionaltests/functionaltests.c b/tests/functionaltests/functionaltests.c index d03d8027..b194bcf8 100644 --- a/tests/functionaltests/functionaltests.c +++ b/tests/functionaltests/functionaltests.c @@ -100,7 +100,7 @@ int main(int argc, char* argv[]) { PROF_FUNC_TEST(shows_history_message), PROF_FUNC_TEST(shows_occupant_join), PROF_FUNC_TEST(shows_message), - + PROF_FUNC_TEST(shows_message_in_console_when_window_not_focussed), }; return run_tests(all_tests); diff --git a/tests/functionaltests/test_muc.c b/tests/functionaltests/test_muc.c index 5911209e..47cbd84e 100644 --- a/tests/functionaltests/test_muc.c +++ b/tests/functionaltests/test_muc.c @@ -222,3 +222,33 @@ shows_message(void **state) assert_true(prof_output_regex("testoccupant: .+a new message")); } + +void +shows_message_in_console_when_window_not_focussed(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")); + + prof_input("/win 1"); + prof_output_exact("Profanity. Type /help for help informatiosn."); + + stbbr_send( + "" + "a new message" + "" + ); + + assert_true(prof_output_exact("<< incoming from testoccupant in testroom@conference.localhost (win 2)")); +} diff --git a/tests/functionaltests/test_muc.h b/tests/functionaltests/test_muc.h index 5b7690cb..5293e50c 100644 --- a/tests/functionaltests/test_muc.h +++ b/tests/functionaltests/test_muc.h @@ -8,3 +8,4 @@ void shows_subject_on_join(void **state); void shows_history_message(void **state); void shows_occupant_join(void **state); void shows_message(void **state); +void shows_message_in_console_when_window_not_focussed(void **state);