From 5ef044eab02e1e8429a05b45398566ad81124fb6 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 23 Jan 2018 14:24:30 +0100 Subject: Fixed imap tests Adding the mail to cyrus imap somehow broke with cyrus 3.0. We're now creating the mail instead, before trying to sync it. --- tests/mailsynctest.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/mailsynctest.cpp b/tests/mailsynctest.cpp index 2d480f7..058cae4 100644 --- a/tests/mailsynctest.cpp +++ b/tests/mailsynctest.cpp @@ -261,6 +261,12 @@ void MailSyncTest::testListRemovedSubFolder() void MailSyncTest::testListMails() { + auto msg = KMime::Message::Ptr::create(); + msg->subject(true)->fromUnicodeString("This is a Subject.", "utf8"); + msg->date(true)->setDateTime(QDateTime::currentDateTimeUtc()); + msg->assemble(); + createMessage(QStringList() << "test", msg->encodedContent(true)); + Sink::Query query; query.resourceFilter(mResourceInstanceIdentifier); query.request().request().request().request(); @@ -272,7 +278,7 @@ void MailSyncTest::testListMails() auto job = Store::fetchAll(query).then([](const QList &mails) { ASYNCCOMPARE(mails.size(), 1); auto mail = mails.first(); - ASYNCVERIFY(mail->getSubject().startsWith(QString("[Nepomuk] Jenkins build is still unstable"))); + ASYNCVERIFY(mail->getSubject().startsWith(QString("This is a Subject."))); const auto data = mail->getMimeMessage(); ASYNCVERIFY(!data.isEmpty()); -- cgit v1.2.3