Commit 416be1b0 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Move mailtemplatetest result attachments compare to bottom of test for easier debug



Signed-off-by: Claudio Cambra's avatarClaudio Cambra <claudio.cambra@gmail.com>
parent febd1a6e
Pipeline #248580 passed with stage
in 2 minutes and 55 seconds
......@@ -593,7 +593,14 @@ private Q_SLOTS:
QCOMPARE(result->contentType()->mimeType(), QByteArray{"multipart/alternative"});
// FIXME: KMime should return 0 for this multipart but it doesn't sometimes(?)
QCOMPARE(result->contents().size(), 2);
QVERIFY(result->contents()[0]->contentType()->isMimeType("text/plain"));
QVERIFY(result->contents()[1]->contentType()->isMimeType("text/calendar"));
QCOMPARE(result->contents()[1]->contentType()->name(), QLatin1String{"event.ics"});
QVERIFY(KMime::isAttachment(result->contents()[1]));
// KMime should return 1 attachment for this multipart but it doesn't sometimes(?)
//
// It is an attachment as the ical part:
// A) Has a name
// B) Has a content disposition of CDattachment
......@@ -601,12 +608,6 @@ private Q_SLOTS:
// Check the result of QVERIFY(KMime::isAttachment(result->contents()[1])); if
// it is true then this confirms that result->attachments() is misreporting
QCOMPARE(result->attachments().count(), 1);
QCOMPARE(result->contents().size(), 2);
QVERIFY(result->contents()[0]->contentType()->isMimeType("text/plain"));
QVERIFY(result->contents()[1]->contentType()->isMimeType("text/calendar"));
QCOMPARE(result->contents()[1]->contentType()->name(), QLatin1String{"event.ics"});
QVERIFY(KMime::isAttachment(result->contents()[1]));
}
void testEncryptedWithProtectedHeadersReply()
......
Supports Markdown
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