diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-09 21:08:47 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-03-09 21:08:47 -0500 |
commit | 3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1 (patch) | |
tree | ab1f4ba4e7635b3ea2cb600cc8de9b3e52a6c9d1 /tests/test-live-actions.cpp | |
parent | 375277fa6b2c8eaac2e2a824bd1e43bbd54b75e3 (diff) | |
download | ayatana-indicator-datetime-3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1.tar.gz ayatana-indicator-datetime-3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1.tar.bz2 ayatana-indicator-datetime-3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1.zip |
decouple the planner's states; need three separate sets: upcoming-now (for alarms in the current time), upcoming-calendar (to show events coming from the selected calendar date), and calendar-month (all the appointments in the month displayed in the menu).
Diffstat (limited to 'tests/test-live-actions.cpp')
-rw-r--r-- | tests/test-live-actions.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test-live-actions.cpp b/tests/test-live-actions.cpp index eab8596..ffba4ce 100644 --- a/tests/test-live-actions.cpp +++ b/tests/test-live-actions.cpp @@ -295,7 +295,8 @@ TEST_F(LiveActionsFixture, CalendarState) const DateTime now (tmp); g_date_time_unref (tmp); m_mock_state->mock_clock->set_localtime (now); - m_state->planner->time.set(now); + m_state->calendar_month->month().set(now); + //m_state->planner->time.set(now); /// /// Test the default calendar state. @@ -315,7 +316,7 @@ TEST_F(LiveActionsFixture, CalendarState) // calendar-day should be in sync with m_state->calendar_day v = g_variant_lookup_value (calendar_state, "calendar-day", G_VARIANT_TYPE_INT64); EXPECT_TRUE (v != nullptr); - EXPECT_EQ (m_state->planner->time.get().to_unix(), g_variant_get_int64(v)); + EXPECT_EQ (m_state->calendar_month->month().get().to_unix(), g_variant_get_int64(v)); g_clear_pointer (&v, g_variant_unref); // show-week-numbers should be false because MockSettings defaults everything to 0 @@ -356,7 +357,7 @@ TEST_F(LiveActionsFixture, CalendarState) a2.begin = next_begin; a2.end = next_end; - m_state->planner->this_month.set(std::vector<Appointment>({a1, a2})); + m_state->calendar_month->appointments().set(std::vector<Appointment>({a1, a2})); /// /// Now test the calendar state again. |