summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <[email protected]>2017-09-24 11:04:32 -0400
committerAllen Winter <[email protected]>2017-09-24 11:04:32 -0400
commit37747de128e4b2e0f063c0eba42f1cc2b10457b4 (patch)
tree95cc8dab6d80efea3fbb30114b257ffac635d8a5
parent9f7b18affa8b56685cf8f7946b40db17551d9621 (diff)
autotests/summaryeventtest.cpp - all tests pass again
-rw-r--r--src/kontactplugin/korganizer/autotests/summaryeventtest.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/kontactplugin/korganizer/autotests/summaryeventtest.cpp b/src/kontactplugin/korganizer/autotests/summaryeventtest.cpp
index 55fd2a0..1ba3832 100644
--- a/src/kontactplugin/korganizer/autotests/summaryeventtest.cpp
+++ b/src/kontactplugin/korganizer/autotests/summaryeventtest.cpp
@@ -18,20 +18,17 @@
Boston, MA 02110-1301, USA.
*/
-#include "qtest.h"
#include "summaryeventtest.h"
#include "../summaryeventinfo.h"
-#include <KCalCore/Event>
#include <KCalCore/MemoryCalendar>
-#include <QTimeZone>
+#include <QTest>
QTEST_GUILESS_MAIN(SummaryEventTester)
void SummaryEventTester::test_Multiday()
{
QDate today = QDate::currentDate();
- QString multidayWithTimeInProgress = QStringLiteral("Multiday, time specified, in progress");
KCalCore::MemoryCalendar *cal = new KCalCore::MemoryCalendar(QTimeZone::systemTimeZone());
@@ -46,12 +43,13 @@ void SummaryEventTester::test_Multiday()
event = KCalCore::Event::Ptr(new KCalCore::Event());
event->setDtStart(QDateTime(today.addDays(-1), QTime(12, 00)));
event->setDtEnd(QDateTime(today.addDays(5), QTime(12, 00)));
+ QString multidayWithTimeInProgress = QStringLiteral("Multiday, time specified, in progress");
event->setSummary(multidayWithTimeInProgress);
QVERIFY(cal->addEvent(event));
for (int i = 0; i < 5; ++i) {
SummaryEventInfo::List events4 = SummaryEventInfo::eventsForDate(today.addDays(i), cal);
QCOMPARE(2, events4.size());
- SummaryEventInfo *ev4 = events4.at(0);
+ SummaryEventInfo *ev4 = events4.at(1);
QCOMPARE(ev4->summaryText, QString(multidayWithTimeInProgress + QString::fromLatin1(" (%1/7)").arg(i + 2)));
QCOMPARE(ev4->timeRange, QStringLiteral("%1 - %2").arg(