aboutsummaryrefslogtreecommitdiff
path: root/tests/test-actions.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-03-14 21:55:03 -0500
committerCharles Kerr <charles.kerr@canonical.com>2015-03-14 21:55:03 -0500
commitb4e12a64cf1347bd9ca5d7b426f0f0591440d498 (patch)
tree75efb2f3ef640c16526778d302619320f8b07588 /tests/test-actions.cpp
parent6481c0ecf40df26eca71779a683aeeab9455f1f2 (diff)
downloadayatana-indicator-datetime-b4e12a64cf1347bd9ca5d7b426f0f0591440d498.tar.gz
ayatana-indicator-datetime-b4e12a64cf1347bd9ca5d7b426f0f0591440d498.tar.bz2
ayatana-indicator-datetime-b4e12a64cf1347bd9ca5d7b426f0f0591440d498.zip
add regression test for bug #1429388
Diffstat (limited to 'tests/test-actions.cpp')
-rw-r--r--tests/test-actions.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test-actions.cpp b/tests/test-actions.cpp
index 74fc380..2a8e370 100644
--- a/tests/test-actions.cpp
+++ b/tests/test-actions.cpp
@@ -253,7 +253,7 @@ TEST_F(ActionsFixture, SetCalendarDate)
EXPECT_TRUE(g_action_group_has_action(action_group, action_name));
// pick an arbitrary DateTime...
- const auto now = DateTime::Local(2010, 1, 2, 3, 4, 5);
+ auto now = DateTime::Local(2010, 1, 2, 3, 4, 5);
// confirm that Planner.time gets changed to that date when we
// activate the 'calendar' action with that date's time_t as the arg
@@ -261,6 +261,18 @@ TEST_F(ActionsFixture, SetCalendarDate)
auto v = g_variant_new_int64(now.to_unix());
g_action_group_activate_action (action_group, action_name, v);
EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get()));
+
+ // DST change in US
+ now = DateTime::Local(2015, 3, 8, 9, 0, 0);
+ v = g_variant_new_int64(now.to_unix());
+ g_action_group_activate_action (action_group, action_name, v);
+ EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get()));
+
+ // DST change in Europe
+ now = DateTime::Local(2015, 3, 29, 9, 0, 0);
+ v = g_variant_new_int64(now.to_unix());
+ g_action_group_activate_action (action_group, action_name, v);
+ EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get()));
}
TEST_F(ActionsFixture, ActivatingTheCalendarResetsItsDate)