aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorkugiigi <kugi_eusebio@protonmail.com>2021-03-20 11:52:07 +0800
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-12-19 16:57:38 +0100
commit63a57fde6677d8f663e5880a259998b95b1da6c5 (patch)
treecff6527e6f869c465e0b90296e761e246a8a39c6 /tests
parentecaacccacf853059ea4588c44bd13035faaba6af (diff)
downloadayatana-indicator-datetime-63a57fde6677d8f663e5880a259998b95b1da6c5.tar.gz
ayatana-indicator-datetime-63a57fde6677d8f663e5880a259998b95b1da6c5.tar.bz2
ayatana-indicator-datetime-63a57fde6677d8f663e5880a259998b95b1da6c5.zip
Add option to show/hide alarms
Diffstat (limited to 'tests')
-rw-r--r--tests/test-menus.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test-menus.cpp b/tests/test-menus.cpp
index 853c3c5..e71c997 100644
--- a/tests/test-menus.cpp
+++ b/tests/test-menus.cpp
@@ -272,6 +272,19 @@ private:
for (int i=0, n=appointments.size(); i<n; i++)
InspectAppointmentMenuItem(section, first_appt_index+i, appointments[i]);
+ // there shouldn't be any alarms when "show alarms" is false
+ bool has_alarms = false;
+
+ m_state->settings->show_alarms.set(false);
+
+ for (int i=0, n=appointments.size(); i<n; i++)
+ if((has_alarms = appointments[i].is_alarm()))
+ break;
+
+ EXPECT_FALSE(has_alarms);
+
+ m_state->settings->show_alarms.set(true);
+
//g_clear_object(&section);
//g_clear_object(&submenu);
}