aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2016-03-16 12:53:31 -0300
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-29 14:37:39 +0200
commitbb2ea938ba2d40d387604104ed8d975d143d04ba (patch)
tree1148fd6939c98f4a42f9f8586513a81f52d837d3
parentc62f5c257ef2874f7abccd727c3915ee456dec59 (diff)
downloadayatana-indicator-datetime-bb2ea938ba2d40d387604104ed8d975d143d04ba.tar.gz
ayatana-indicator-datetime-bb2ea938ba2d40d387604104ed8d975d143d04ba.tar.bz2
ayatana-indicator-datetime-bb2ea938ba2d40d387604104ed8d975d143d04ba.zip
update unit test.
-rw-r--r--tests/test-live-actions.cpp14
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();