diff options
author | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2016-04-06 10:37:28 -0300 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-29 14:37:39 +0200 |
commit | 09d434e543f3806a11ad6ebb5dad99dffae46d28 (patch) | |
tree | 828dac340b1672da45e1603352e8192355d89877 | |
parent | 1f73b610287f28ae1f6779d80e9509b0220d5f44 (diff) | |
download | ayatana-indicator-datetime-09d434e543f3806a11ad6ebb5dad99dffae46d28.tar.gz ayatana-indicator-datetime-09d434e543f3806a11ad6ebb5dad99dffae46d28.tar.bz2 ayatana-indicator-datetime-09d434e543f3806a11ad6ebb5dad99dffae46d28.zip |
Generate instance of object to get individual alarm information.
-rw-r--r-- | src/engine-eds.cpp | 2 | ||||
-rw-r--r-- | tests/test-eds-ics-non-attending-alarms.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp index 585841b..7f5e080 100644 --- a/src/engine-eds.cpp +++ b/src/engine-eds.cpp @@ -102,6 +102,8 @@ public: auto gtz = timezone_from_name(tz, nullptr, nullptr, &default_timezone); if (gtz == nullptr) { gtz = g_time_zone_new_local(); + } else { + g_time_zone_ref(gtz); } g_debug("default_timezone is %s", default_timezone ? i_cal_timezone_get_display_name(default_timezone) : "null"); diff --git a/tests/test-eds-ics-non-attending-alarms.cpp b/tests/test-eds-ics-non-attending-alarms.cpp index 227ae7f..efbb5fd 100644 --- a/tests/test-eds-ics-non-attending-alarms.cpp +++ b/tests/test-eds-ics-non-attending-alarms.cpp @@ -80,7 +80,9 @@ TEST_F(VAlarmFixture, NonAttendingEvent) // the planner should match what we've got in the calendar.ics file const auto appts = planner->appointments().get(); - ASSERT_EQ(2, appts.size()); + EXPECT_EQ(2, appts.size()); + EXPECT_EQ(appts[0].begin, DateTime(gtz, 2016, 4, 4, 16, 0, 0)); + EXPECT_EQ(appts[1].begin, DateTime(gtz, 2016, 4, 6, 16, 0, 0)); // cleanup g_time_zone_unref(gtz); |