Commit e6af8c8b authored by Volker Krause's avatar Volker Krause
Browse files

Adapt calendar test reference data to new address formatting rules

Comes in via the 5.92 update of KF5::Contacts. Also uncovered that we
missed forwarding the region field to address formatting.
parent 80858b20
Pipeline #143784 passed with stages
in 1 minute and 24 seconds
......@@ -35,7 +35,7 @@ ecm_add_test(timefindertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim:
ecm_add_test(postprocessortest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(extractorvalidatortest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
if (TARGET KF5::CalendarCore)
ecm_add_test(calendarhandlertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
ecm_add_test(calendarhandlertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary KF5::Contacts)
ecm_add_test(extractortest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary KPim::PkPass)
endif()
ecm_add_test(documentutiltest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KPim::Itinerary)
......
......@@ -20,7 +20,7 @@ UID:KIT-1234567890-1b22236a-21ff-4885-8c99-b3b2bbca062c
LAST-MODIFIED:20171227T111649Z
SUMMARY:Akademy 2019
LOCATION:University of Milano-Bicocca
DESCRIPTION:PIAZZA DELL'ATENEO NUOVO\, 1\n20126 MILAN\n\nITALY\n
DESCRIPTION:Piazza dell'Ateneo Nuovo\, 1\n20126 MILAN LOMBARDY\n\nITALY\n
DTSTART;TZID=Europe/Rome:20190907T093000
DTEND;TZID=Europe/Rome:20190713T163000
TRANSP:OPAQUE
......
......@@ -29,7 +29,7 @@ X-KDE-KITINERARY-RESERVATION:[{"@context":"http://schema.org"\,"@type":
CREATED:20171227T111649Z
UID:KIT-1234567890-1b22236a-21ff-4885-8c99-b3b2bbca062c
LAST-MODIFIED:20171227T111649Z
DESCRIPTION:PIAZZA DELL'ATENEO NUOVO\, 1\n20126 MILAN\n\nITALY\n\nDr Konqui\nBooking reference: 42\nKatie Dragon\nBooking reference: 42
DESCRIPTION:Piazza dell'Ateneo Nuovo\, 1\n20126 MILAN LOMBARDY\n\nITALY\n\nDr Konqui\nBooking reference: 42\nKatie Dragon\nBooking reference: 42
SUMMARY:Akademy 2019
LOCATION:University of Milano-Bicocca
DTSTART;TZID=Europe/Rome:20190907T093000
......
......@@ -9,7 +9,7 @@ UID:KIT-1234567890-1b22236a-21ff-4885-8c99-b3b2bbca062c
LAST-MODIFIED:20171227T111649Z
DESCRIPTION:Check-in: 3:00 PM\nCheck-out: 12:00 PM\nPhone: +358101234567\nWebsite: https://www.booking.com/hotel/fi/palace-sello.html?aid=123456&label=postbooking_confemail\nJohn Doe\nBooking reference: 1234567890
SUMMARY:Hotel reservation: Glo Hotel Sello
LOCATION:Leppävaarankatu 1\, 02600 ESPOO\, FINLAND
LOCATION:Leppävaarankatu 1\, FI-02600 Espoo\, FINLAND
DTSTART;VALUE=DATE:20170919
DTEND;VALUE=DATE:20170921
TRANSP:TRANSPARENT
......
......@@ -27,9 +27,7 @@ CREATED:20171227T111649Z
UID:KIT-1234567890-1b22236a-21ff-4885-8c99-b3b2bbca062c
LAST-MODIFIED:20171227T111649Z
DESCRIPTION:Pickup location: Hertz San Diego Airport\n1500 Orange
Avenue\nSan Diego\, 94043\n\nUNITED STATES\n\nDropoff location: Hertz
LAX\n1234 First Street\nLos Angeles\, 94043\n\nUNITED STATES\n\nBooking
reference: 546323\nUnder name: John Smith
Avenue\nSAN DIEGO\, CA 94043\n\nUNITED STATES\n\nDropoff location: Hertz LAX\n1234 First Street\nLOS ANGELES\, CA 94043\n\nUNITED STATES\n\nBooking reference: 546323\nUnder name: John Smith
SUMMARY:Rental car reservation: Economy Class Car
LOCATION:Hertz San Diego Airport
DTSTART;TZID="UTC-07:00":20270805T160000
......
......@@ -10,6 +10,7 @@
#include <KCalendarCore/ICalFormat>
#include <KCalendarCore/MemoryCalendar>
#include <kcontacts_version.h>
#include <QDebug>
#include <QFile>
......@@ -101,7 +102,10 @@ private Q_SLOTS:
QCOMPARE(newEvent->dtStart(), refEvent->dtStart());
QCOMPARE(newEvent->dtEnd(), refEvent->dtEnd());
#if KContacts_VERSION >= QT_VERSION_CHECK(5, 92, 0)
QCOMPARE(newEvent->description(), refEvent->description());
QVERIFY(*newEvent == *refEvent);
#endif
}
void testFindEvent_data()
......
......@@ -45,6 +45,7 @@ static QString formatAddress(const PostalAddress &addr)
a.setStreet(addr.streetAddress());
a.setPostalCode(addr.postalCode());
a.setLocality(addr.addressLocality());
a.setRegion(addr.addressRegion());
a.setCountry(addr.addressCountry());
return a.formattedAddress();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment