From e354603dcb42c54ab11c0c393d5a1607ed6343d7 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 10 Aug 2017 17:39:23 -0600 Subject: Don't quote attachments in the reply --- framework/src/domain/mime/tests/mailtemplatetest.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'framework/src/domain/mime/tests') diff --git a/framework/src/domain/mime/tests/mailtemplatetest.cpp b/framework/src/domain/mime/tests/mailtemplatetest.cpp index 9ec7cf18..0e8eb2c3 100644 --- a/framework/src/domain/mime/tests/mailtemplatetest.cpp +++ b/framework/src/domain/mime/tests/mailtemplatetest.cpp @@ -151,6 +151,19 @@ private slots: 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")); } + void testAttachmentReply() + { + auto msg = readMail("plaintextattachment.mbox"); + KMime::Message::Ptr result; + MailTemplates::reply(msg, [&] (const KMime::Message::Ptr &r) { + result = r; + }); + QTRY_VERIFY(result); + auto content = removeFirstLine(result->body()); + QVERIFY(!content.isEmpty()); + QCOMPARE(unquote(content), QLatin1String("sdlkjsdjf")); + } + void testCreatePlainMail() { QStringList to = {{"to@example.org"}}; -- cgit v1.2.3