aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-07-18 05:35:40 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-07-18 05:35:40 +0200
commite246fe0945c3e5b99b1aa0ed3cfb77c6a08ca01a (patch)
tree11bf16345d986ad0f098987b004093be80f0d890 /tests
parent11ee7a561c21b7ea6446eb9a15001b264d1c05e6 (diff)
downloadayatana-indicator-session-e246fe0945c3e5b99b1aa0ed3cfb77c6a08ca01a.tar.gz
ayatana-indicator-session-e246fe0945c3e5b99b1aa0ed3cfb77c6a08ca01a.tar.bz2
ayatana-indicator-session-e246fe0945c3e5b99b1aa0ed3cfb77c6a08ca01a.zip
Provide to 'Help' menu items. One for Distro Help, one for Desktop Help.
Diffstat (limited to 'tests')
-rw-r--r--tests/backend-mock-actions.c13
-rw-r--r--tests/test-service.cc12
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));