summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-21 14:28:54 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-21 14:28:54 (GMT)
commit87b1a6d6d71f91d3d9c5ca9b7c9889a4c3fc5e63 (patch)
treefd678df9e00bcdae412d537b6c825e9b88fd2bcf
parent6c2feb62387b8f2ec3bffee47e01188da4f6ae90 (diff)
Add more autotest
-rw-r--r--messagecomposer/autotests/messagefactorytest.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/messagecomposer/autotests/messagefactorytest.cpp b/messagecomposer/autotests/messagefactorytest.cpp
index 940db13..df619ee 100644
--- a/messagecomposer/autotests/messagefactorytest.cpp
+++ b/messagecomposer/autotests/messagefactorytest.cpp
@@ -181,6 +181,18 @@ void MessageFactoryTest::testCreateReplyHtml()
QCOMPARE(reply.msg->subject()->asUnicodeString(), QLatin1String("Re: reply to please"));
QCOMPARE(reply.msg->contents().count(), 2);
QCOMPARE_OR_DIFF(reply.msg->contents().at(0)->body(), replyStr.toLatin1());
+
+
+ TemplateParser::TemplateParserSettings::self()->setReplyUsingHtml(false);
+ reply = factory.createReply();
+ reply.replyAll = true;
+ datetime = QLocale::system().toString(date.date(), QLocale::LongFormat);
+ datetime += QLatin1String(" ") + QLocale::system().toString(date.time(), QLocale::LongFormat);
+ QCOMPARE(reply.msg->contentType()->mimeType(), QByteArrayLiteral("text/plain"));
+ QCOMPARE(reply.msg->subject()->asUnicodeString(), QLatin1String("Re: reply to please"));
+ QCOMPARE(reply.msg->contents().count(), 0);
+ TemplateParser::TemplateParserSettings::self()->setReplyUsingHtml(true);
+
delete identMan;
}
@@ -189,6 +201,7 @@ void MessageFactoryTest::testCreateReplyUTF16Base64()
KMime::Message::Ptr msg = loadMessageFromFile(QStringLiteral("plain_utf16.mbox"));
KIdentityManagement::IdentityManager *identMan = new KIdentityManagement::IdentityManager;
+ TemplateParser::TemplateParserSettings::self()->setReplyUsingHtml(true);
// qDebug() << "plain base64 msg message:" << msg->encodedContent();
MessageFactory factory(msg, 0);