summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/tests/mailtemplatetest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-11 16:01:27 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-11 16:01:27 +0200
commit37f18e26ca729fac64fd29164b09f3d3f1143520 (patch)
treecf9c45d43069cbc9bf38e825ad34e0817cd3835b /framework/src/domain/mime/tests/mailtemplatetest.cpp
parent8994cab9db689e13dae7445b1946920dca4c6be7 (diff)
downloadkube-37f18e26ca729fac64fd29164b09f3d3f1143520.tar.gz
kube-37f18e26ca729fac64fd29164b09f3d3f1143520.zip
Fixed multipart/alternative replies
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)