diff options
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"}}; |