aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/backend-mock-actions.c7
-rw-r--r--tests/com.canonical.indicator.session.backendmock.gschema.xml4
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/backend-mock-actions.c b/tests/backend-mock-actions.c
index d5a506b..af4afd9 100644
--- a/tests/backend-mock-actions.c
+++ b/tests/backend-mock-actions.c
@@ -44,6 +44,12 @@ my_can_logout (IndicatorSessionActions * self G_GNUC_UNUSED)
}
static gboolean
+my_can_reboot (IndicatorSessionActions * self G_GNUC_UNUSED)
+{
+ return g_settings_get_boolean (mock_settings, "can-reboot");
+}
+
+static gboolean
my_can_switch (IndicatorSessionActions * self G_GNUC_UNUSED)
{
return g_settings_get_boolean (mock_settings, "can-switch-sessions");
@@ -177,6 +183,7 @@ indicator_session_actions_mock_class_init (IndicatorSessionActionsMockClass * kl
actions_class = INDICATOR_SESSION_ACTIONS_CLASS (klass);
actions_class->can_lock = my_can_lock;
actions_class->can_logout = my_can_logout;
+ actions_class->can_reboot = my_can_reboot;
actions_class->can_switch = my_can_switch;
actions_class->can_suspend = my_can_suspend;
actions_class->can_hibernate = my_can_hibernate;
diff --git a/tests/com.canonical.indicator.session.backendmock.gschema.xml b/tests/com.canonical.indicator.session.backendmock.gschema.xml
index 34479df..79d0c02 100644
--- a/tests/com.canonical.indicator.session.backendmock.gschema.xml
+++ b/tests/com.canonical.indicator.session.backendmock.gschema.xml
@@ -21,6 +21,10 @@
<default>true</default>
<summary>Is logging out allowed?</summary>
</key>
+ <key type="b" name="can-reboot">
+ <default>true</default>
+ <summary>Is rebooting allowed?</summary>
+ </key>
<key type="b" name="can-lock">
<default>true</default>
<summary>Is locking the session allowed?</summary>