diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/backend-mock-actions.c | 13 | ||||
-rw-r--r-- | tests/test-service.cc | 12 |
2 files changed, 19 insertions, 6 deletions
diff --git a/tests/backend-mock-actions.c b/tests/backend-mock-actions.c index 25a606f..15a0bd9 100644 --- a/tests/backend-mock-actions.c +++ b/tests/backend-mock-actions.c @@ -124,9 +124,15 @@ my_switch_to_username (IndicatorSessionActions * self G_GNUC_UNUSED, } static void -my_help (IndicatorSessionActions * self G_GNUC_UNUSED) +my_desktop_help (IndicatorSessionActions * self G_GNUC_UNUSED) { - g_settings_set_string (mock_settings, "last-command", "help"); + g_settings_set_string (mock_settings, "last-command", "desktop_help"); +} + +static void +my_distro_help (IndicatorSessionActions * self G_GNUC_UNUSED) +{ + g_settings_set_string (mock_settings, "last-command", "distro_help"); } static void @@ -202,7 +208,8 @@ indicator_session_actions_mock_class_init (IndicatorSessionActionsMockClass * kl actions_class->power_off = my_power_off; actions_class->settings = my_settings; actions_class->online_accounts = my_online_accounts; - actions_class->help = my_help; + actions_class->desktop_help = my_desktop_help; + actions_class->distro_help = my_distro_help; actions_class->about = my_about; actions_class->switch_to_screensaver = my_switch_to_screensaver; actions_class->switch_to_greeter = my_switch_to_greeter; diff --git a/tests/test-service.cc b/tests/test-service.cc index 7dae887..ddb02d6 100644 --- a/tests/test-service.cc +++ b/tests/test-service.cc @@ -383,9 +383,14 @@ TEST_F (ServiceTest, About) test_simple_action ("about"); } -TEST_F (ServiceTest, Help) +TEST_F (ServiceTest, DesktopHelp) { - test_simple_action ("help"); + test_simple_action ("desktop_help"); +} + +TEST_F (ServiceTest, DistroHelp) +{ + test_simple_action ("distro_help"); } TEST_F (ServiceTest, Hibernate) @@ -693,7 +698,8 @@ TEST_F (ServiceTest, LockdownUserSwitchingAndLockScreen) TEST_F (ServiceTest, DefaultMenuItems) { ASSERT_TRUE (find_menu_item_for_action ("indicator.about", NULL, NULL)); - ASSERT_TRUE (find_menu_item_for_action ("indicator.help", NULL, NULL)); + ASSERT_TRUE (find_menu_item_for_action ("indicator.desktop_help", NULL, NULL)); + ASSERT_TRUE (find_menu_item_for_action ("indicator.distro_help", NULL, NULL)); ASSERT_TRUE (find_menu_item_for_action ("indicator.settings", NULL, NULL)); ASSERT_TRUE (find_menu_item_for_action ("indicator.switch-to-screensaver", NULL, NULL)); ASSERT_TRUE (find_menu_item_for_action ("indicator.switch-to-guest", NULL, NULL)); |