summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/teststore.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/teststore.cpp b/tests/teststore.cpp
index 9d56dd33..84e2da20 100644
--- a/tests/teststore.cpp
+++ b/tests/teststore.cpp
@@ -64,6 +64,19 @@ static void createMail(const QVariantMap &object, const QByteArray &folder = {})
64 auto ccAddresses = toStringList(object["cc"].toList()); 64 auto ccAddresses = toStringList(object["cc"].toList());
65 auto bccAddresses = toStringList(object["bcc"].toList()); 65 auto bccAddresses = toStringList(object["bcc"].toList());
66 66
67 QList<Attachment> attachments = {};
68 if (object.contains("attachments")) {
69 auto attachmentSpecs = object["attachments"].toList();
70 for (int i = 0; i < attachmentSpecs.size(); ++i) {
71 auto const &spec = attachmentSpecs.at(i).toMap();
72 attachments << Attachment{spec["name"].toString(),
73 spec["name"].toString(),
74 spec["mimeType"].toByteArray(),
75 false,
76 spec["data"].toByteArray()};
77 }
78 }
79
67 KMime::Types::Mailbox mb; 80 KMime::Types::Mailbox mb;
68 mb.fromUnicodeString("identity@example.org"); 81 mb.fromUnicodeString("identity@example.org");
69 auto msg = MailTemplates::createMessage({}, 82 auto msg = MailTemplates::createMessage({},
@@ -74,7 +87,7 @@ static void createMail(const QVariantMap &object, const QByteArray &folder = {})
74 object["subject"].toString(), 87 object["subject"].toString(),
75 object["body"].toString(), 88 object["body"].toString(),
76 object["bodyIsHtml"].toBool(), 89 object["bodyIsHtml"].toBool(),
77 {}, 90 attachments,
78 {}, 91 {},
79 {}); 92 {});
80 if (object.contains("messageId")) { 93 if (object.contains("messageId")) {