diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-11 14:01:47 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-11 14:01:47 -0600 |
commit | 0e34fa912174733c958f5795c6113342c17c9780 (patch) | |
tree | 61ea76aadafcca79c7f233a481656712b86e5236 /framework/src/domain/mime/tests/mailtemplatetest.cpp | |
parent | b6ffe9af5a00f93cd5e5dac1ebd8dabc475388e1 (diff) | |
download | kube-0e34fa912174733c958f5795c6113342c17c9780.tar.gz kube-0e34fa912174733c958f5795c6113342c17c9780.zip |
Take personal email addresses into account when replying.
Diffstat (limited to 'framework/src/domain/mime/tests/mailtemplatetest.cpp')
-rw-r--r-- | framework/src/domain/mime/tests/mailtemplatetest.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/framework/src/domain/mime/tests/mailtemplatetest.cpp b/framework/src/domain/mime/tests/mailtemplatetest.cpp index 51c5e243..098c34bc 100644 --- a/framework/src/domain/mime/tests/mailtemplatetest.cpp +++ b/framework/src/domain/mime/tests/mailtemplatetest.cpp | |||
@@ -181,6 +181,27 @@ private slots: | |||
181 | QCOMPARE(result->cc()->addresses(), l); | 181 | QCOMPARE(result->cc()->addresses(), l); |
182 | } | 182 | } |
183 | 183 | ||
184 | void testMultiRecipientReplyFilteringMe() | ||
185 | { | ||
186 | KMime::Types::AddrSpecList me; | ||
187 | KMime::Types::Mailbox mb; | ||
188 | mb.setAddress("release-team@kde.org"); | ||
189 | me << mb.addrSpec(); | ||
190 | |||
191 | auto msg = readMail("multirecipients.mbox"); | ||
192 | KMime::Message::Ptr result; | ||
193 | MailTemplates::reply(msg, [&] (const KMime::Message::Ptr &r) { | ||
194 | result = r; | ||
195 | }, me); | ||
196 | QTRY_VERIFY(result); | ||
197 | auto content = removeFirstLine(result->body()); | ||
198 | QVERIFY(!content.isEmpty()); | ||
199 | QCOMPARE(unquote(content), QLatin1String("test")); | ||
200 | QCOMPARE(result->to()->addresses(), {{"konqi@example.org"}}); | ||
201 | auto l = QVector<QByteArray>{{"kde-devel@kde.org"}}; | ||
202 | QCOMPARE(result->cc()->addresses(), l); | ||
203 | } | ||
204 | |||
184 | void testCreatePlainMail() | 205 | void testCreatePlainMail() |
185 | { | 206 | { |
186 | QStringList to = {{"to@example.org"}}; | 207 | QStringList to = {{"to@example.org"}}; |