diff options
author | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2016-03-21 14:32:39 -0300 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-29 14:37:39 +0200 |
commit | 7fde2181c74fada11d537e2f09ccbb8e5745ae8c (patch) | |
tree | db344aca03d90cf80eab706229944a956e8ef223 /tests/test-live-actions.cpp | |
parent | bbf8fdba0f3a8d57dcea96d2cfbc55e833c39adb (diff) | |
download | ayatana-indicator-datetime-7fde2181c74fada11d537e2f09ccbb8e5745ae8c.tar.gz ayatana-indicator-datetime-7fde2181c74fada11d537e2f09ccbb8e5745ae8c.tar.bz2 ayatana-indicator-datetime-7fde2181c74fada11d537e2f09ccbb8e5745ae8c.zip |
Make sure that the ocurrence time is used to build the url to launch external application.
Diffstat (limited to 'tests/test-live-actions.cpp')
-rw-r--r-- | tests/test-live-actions.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test-live-actions.cpp b/tests/test-live-actions.cpp index 3f79d7d..e7cb1a2 100644 --- a/tests/test-live-actions.cpp +++ b/tests/test-live-actions.cpp @@ -64,7 +64,7 @@ TEST_F(TimedateFixture, DesktopOpenAppointment) Appointment a; a.uid = "some-uid"; a.begin = DateTime::NowLocal(); - m_actions->desktop_open_appointment(a); + m_actions->desktop_open_appointment(a, a.begin); const std::string expected_substr = "evolution \"calendar:///?startdate="; EXPECT_NE(m_live_actions->last_cmd.find(expected_substr), std::string::npos); } @@ -106,12 +106,13 @@ TEST_F(TimedateFixture, PhoneOpenAppointment) a.source_uid = "source-uid"; a.begin = DateTime::NowLocal(); a.type = Appointment::EVENT; - m_actions->phone_open_appointment(a); - const std::string appointment_app_url = "calendar://eventid=source-uid/event-uid"; + auto ocurrenceDate = DateTime::Local(2014, 1, 1, 0, 0, 0); + m_actions->phone_open_appointment(a, ocurrenceDate); + const std::string appointment_app_url = ocurrenceDate.to_timezone("UTC").format("calendar://startdate=%Y-%m-%dT%H:%M:%S+00:00"); EXPECT_EQ(appointment_app_url, m_live_actions->last_url); a.type = Appointment::UBUNTU_ALARM; - m_actions->phone_open_appointment(a); + m_actions->phone_open_appointment(a, a.begin); EXPECT_EQ(clock_app_url, m_live_actions->last_url); } @@ -119,7 +120,7 @@ TEST_F(TimedateFixture, PhoneOpenCalendarApp) { 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"); + const std::string expected = now.to_timezone("UTC").format("calendar://startdate=%Y-%m-%dT%H:%M:%S+00:00"); EXPECT_EQ(expected, m_live_actions->last_url); } |