summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/tests/mailtemplatetest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/domain/mime/tests/mailtemplatetest.cpp')
-rw-r--r--framework/src/domain/mime/tests/mailtemplatetest.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/framework/src/domain/mime/tests/mailtemplatetest.cpp b/framework/src/domain/mime/tests/mailtemplatetest.cpp
index 4dc8e2bd..e9752c9e 100644
--- a/framework/src/domain/mime/tests/mailtemplatetest.cpp
+++ b/framework/src/domain/mime/tests/mailtemplatetest.cpp
@@ -93,6 +93,19 @@ private slots:
93 QVERIFY(content.contains("i noticed a new branch")); 93 QVERIFY(content.contains("i noticed a new branch"));
94 } 94 }
95 95
96 void testMultipartAlternative()
97 {
98 auto msg = readMail("alternative.mbox");
99 KMime::Message::Ptr result;
100 MailTemplates::reply(msg, [&] (const KMime::Message::Ptr &r) {
101 result = r;
102 });
103 QTRY_VERIFY(result);
104 auto content = removeFirstLine(result->body());
105 QVERIFY(!content.isEmpty());
106 QCOMPARE(unquote(content), QLatin1String("If you can see this text it means that your email client couldn't display our newsletter properly.\nPlease visit this link to view the newsletter on our website: http://www.gog.com/newsletter/\n"));
107 }
108
96}; 109};
97 110
98QTEST_MAIN(MailTemplateTest) 111QTEST_MAIN(MailTemplateTest)