diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-11 13:31:56 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-11 13:31:56 -0600 |
commit | b6ffe9af5a00f93cd5e5dac1ebd8dabc475388e1 (patch) | |
tree | 874d4dfdb984a2b93a50d6b0903c397948c76e34 /framework/src/domain/mime/tests/mailtemplatetest.cpp | |
parent | e07a23c486f67cc2014af3fd8a639a13dd100162 (diff) | |
download | kube-b6ffe9af5a00f93cd5e5dac1ebd8dabc475388e1.tar.gz kube-b6ffe9af5a00f93cd5e5dac1ebd8dabc475388e1.zip |
Test replies
Diffstat (limited to 'framework/src/domain/mime/tests/mailtemplatetest.cpp')
-rw-r--r-- | framework/src/domain/mime/tests/mailtemplatetest.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/framework/src/domain/mime/tests/mailtemplatetest.cpp b/framework/src/domain/mime/tests/mailtemplatetest.cpp index 92dfba65..51c5e243 100644 --- a/framework/src/domain/mime/tests/mailtemplatetest.cpp +++ b/framework/src/domain/mime/tests/mailtemplatetest.cpp | |||
@@ -165,6 +165,22 @@ private slots: | |||
165 | QCOMPARE(unquote(content), QLatin1String("sdlkjsdjf")); | 165 | QCOMPARE(unquote(content), QLatin1String("sdlkjsdjf")); |
166 | } | 166 | } |
167 | 167 | ||
168 | void testMultiRecipientReply() | ||
169 | { | ||
170 | auto msg = readMail("multirecipients.mbox"); | ||
171 | KMime::Message::Ptr result; | ||
172 | MailTemplates::reply(msg, [&] (const KMime::Message::Ptr &r) { | ||
173 | result = r; | ||
174 | }); | ||
175 | QTRY_VERIFY(result); | ||
176 | auto content = removeFirstLine(result->body()); | ||
177 | QVERIFY(!content.isEmpty()); | ||
178 | QCOMPARE(unquote(content), QLatin1String("test")); | ||
179 | QCOMPARE(result->to()->addresses(), {{"konqi@example.org"}}); | ||
180 | auto l = QVector<QByteArray>{{"release-team@kde.org"}, {"kde-devel@kde.org"}}; | ||
181 | QCOMPARE(result->cc()->addresses(), l); | ||
182 | } | ||
183 | |||
168 | void testCreatePlainMail() | 184 | void testCreatePlainMail() |
169 | { | 185 | { |
170 | QStringList to = {{"to@example.org"}}; | 186 | QStringList to = {{"to@example.org"}}; |