summaryrefslogtreecommitdiffstats
path: root/tests/teststore.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-01-11 13:14:47 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-01-11 14:40:19 +0100
commit9636c0b3e365fe144e11731a9628f5cfa034543d (patch)
tree874842f7aae24ffe94447b060a145095e7fa0af2 /tests/teststore.cpp
parenta9347ad53529f4cf89367746c86de5282104c8fc (diff)
downloadkube-9636c0b3e365fe144e11731a9628f5cfa034543d.tar.gz
kube-9636c0b3e365fe144e11731a9628f5cfa034543d.zip
Test some basic properties of outgoing mails
Diffstat (limited to 'tests/teststore.cpp')
-rw-r--r--tests/teststore.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/teststore.cpp b/tests/teststore.cpp
index 817101be..294aca8f 100644
--- a/tests/teststore.cpp
+++ b/tests/teststore.cpp
@@ -172,3 +172,16 @@ QVariant TestStore::load(const QByteArray &type, const QVariantMap &filter)
172 Q_ASSERT(false); 172 Q_ASSERT(false);
173 return {}; 173 return {};
174} 174}
175
176QVariantMap TestStore::read(const QVariant &object)
177{
178 using namespace Sink::ApplicationDomain;
179 QVariantMap map;
180 if (auto mail = object.value<Mail::Ptr>()) {
181 map.insert("subject", mail->getSubject());
182 map.insert("draft", mail->getDraft());
183 return map;
184 }
185 Q_ASSERT(false);
186 return {};
187}