diff --git a/tests/functionaltests/functionaltests.c b/tests/functionaltests/functionaltests.c index b42e3a21..394b31d9 100644 --- a/tests/functionaltests/functionaltests.c +++ b/tests/functionaltests/functionaltests.c @@ -156,6 +156,7 @@ main(int argc, char* argv[]) PROF_FUNC_TEST(autoping_warning_not_shown_when_autoping_enabled), PROF_FUNC_TEST(autoping_warning_not_shown_when_user_disabled), PROF_FUNC_TEST(autoping_warning_not_shown_for_user_jid), + PROF_FUNC_TEST(autoping_warning_not_shown_for_subdomain_service), /* Service Discovery - XEP-0030 */ PROF_FUNC_TEST(disco_info_shows_identity), diff --git a/tests/functionaltests/test_autoping.c b/tests/functionaltests/test_autoping.c index 070254ae..c8853af1 100644 --- a/tests/functionaltests/test_autoping.c +++ b/tests/functionaltests/test_autoping.c @@ -231,3 +231,25 @@ autoping_warning_not_shown_for_user_jid(void** state) prof_timeout(NEGATIVE_ASSERT_TIMEOUT); assert_false(prof_output_regex(AUTOPING_WARNING_MATCH)); } + +void +autoping_warning_not_shown_for_subdomain_service(void** state) +{ + // disco#info from a subdomain service should not trigger the warning, only the server's own domain should + stbbr_for_query("http://jabber.org/protocol/disco#info", + "" + "" + "" + "" + "" + "" + ); + + prof_input("/autoping set 0"); + assert_true(prof_output_exact("Autoping disabled.")); + + prof_connect(); + + prof_timeout(NEGATIVE_ASSERT_TIMEOUT); + assert_false(prof_output_regex(AUTOPING_WARNING_MATCH)); +} diff --git a/tests/functionaltests/test_autoping.h b/tests/functionaltests/test_autoping.h index 73d29931..3226f9ee 100644 --- a/tests/functionaltests/test_autoping.h +++ b/tests/functionaltests/test_autoping.h @@ -9,3 +9,4 @@ void autoping_warning_not_shown_when_server_unsupported(void** state); void autoping_warning_not_shown_when_autoping_enabled(void** state); void autoping_warning_not_shown_when_user_disabled(void** state); void autoping_warning_not_shown_for_user_jid(void** state); +void autoping_warning_not_shown_for_subdomain_service(void** state);