aboutsummaryrefslogtreecommitdiff
path: root/tests/test-service.cc
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-07-12 07:42:07 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-07-12 07:42:07 -0500
commita19955f3f81b1a5eb8fc928bc5dcf8a24bb6833f (patch)
tree54b1593439a2ef0e69d30a3b8cb891d865db9d31 /tests/test-service.cc
parentc9352cd0a8363e4508d19e66ccf373b2abb2b7d3 (diff)
downloadayatana-indicator-session-a19955f3f81b1a5eb8fc928bc5dcf8a24bb6833f.tar.gz
ayatana-indicator-session-a19955f3f81b1a5eb8fc928bc5dcf8a24bb6833f.tar.bz2
ayatana-indicator-session-a19955f3f81b1a5eb8fc928bc5dcf8a24bb6833f.zip
add the online-accounts action and unit tests for it
Diffstat (limited to 'tests/test-service.cc')
-rw-r--r--tests/test-service.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-service.cc b/tests/test-service.cc
index 86f49e6..2027ec0 100644
--- a/tests/test-service.cc
+++ b/tests/test-service.cc
@@ -589,6 +589,15 @@ TEST_F (ServiceTest, OnlineAccountError)
ASSERT_TRUE (find_menu_item_for_action ("indicator.online-accounts", &model, &pos));
g_clear_object (&model);
+ // check that the service has a corresponding action
+ ASSERT_TRUE (g_action_group_has_action (G_ACTION_GROUP(action_group), "online-accounts"));
+ ASSERT_TRUE (g_action_group_get_action_enabled (G_ACTION_GROUP(action_group), "online-accounts"));
+
+ // confirm that activating the action is handled by the service
+ g_action_group_activate_action (G_ACTION_GROUP(action_group), "online-accounts", NULL);
+ wait_for_signal (mock_settings, "changed::last-command");
+ check_last_command_is ("online-accounts");
+
// check that the header's icon and a11y adjusted to the error state
check_header ("", "system-devices-panel-alert", "System (Attention Required)");