diff options
author | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2016-03-16 12:53:31 -0300 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-07-01 16:27:56 +0200 |
commit | 179bbad3a5c1c12abb36dc1c3702cb50b6be8f2e (patch) | |
tree | c8bf11491c08e36f86533f849927892bdc61d966 | |
parent | 8b3ff84240470f403a93b577a6cec1a10311512d (diff) | |
download | ayatana-indicator-datetime-179bbad3a5c1c12abb36dc1c3702cb50b6be8f2e.tar.gz ayatana-indicator-datetime-179bbad3a5c1c12abb36dc1c3702cb50b6be8f2e.tar.bz2 ayatana-indicator-datetime-179bbad3a5c1c12abb36dc1c3702cb50b6be8f2e.zip |
update unit test.
-rw-r--r-- | tests/test-live-actions.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/test-live-actions.cpp b/tests/test-live-actions.cpp index 9f17001..3f79d7d 100644 --- a/tests/test-live-actions.cpp +++ b/tests/test-live-actions.cpp @@ -90,8 +90,6 @@ TEST_F(TimedateFixture, DesktopOpenSettingsApp) namespace { const std::string clock_app_url = "appid://com.ubuntu.clock/clock/current-user-version"; - - const std::string calendar_app_url = "appid://com.ubuntu.calendar/calendar/current-user-version"; } TEST_F(TimedateFixture, PhoneOpenAlarmApp) @@ -104,11 +102,13 @@ TEST_F(TimedateFixture, PhoneOpenAppointment) { Appointment a; - a.uid = "some-uid"; + a.uid = "event-uid"; + a.source_uid = "source-uid"; a.begin = DateTime::NowLocal(); a.type = Appointment::EVENT; m_actions->phone_open_appointment(a); - EXPECT_EQ(calendar_app_url, m_live_actions->last_url); + const std::string appointment_app_url = "calendar://eventid=source-uid/event-uid"; + EXPECT_EQ(appointment_app_url, m_live_actions->last_url); a.type = Appointment::UBUNTU_ALARM; m_actions->phone_open_appointment(a); @@ -117,11 +117,13 @@ TEST_F(TimedateFixture, PhoneOpenAppointment) TEST_F(TimedateFixture, PhoneOpenCalendarApp) { - m_actions->phone_open_calendar_app(DateTime::NowLocal()); - const std::string expected = "appid://com.ubuntu.calendar/calendar/current-user-version"; + auto now = DateTime::NowLocal(); + m_actions->phone_open_calendar_app(now); + const std::string expected = now.format("calendar:///?startdate=%Y%m%dT%H%M%SZ"); EXPECT_EQ(expected, m_live_actions->last_url); } + TEST_F(TimedateFixture, PhoneOpenSettingsApp) { m_actions->phone_open_settings_app(); |