From 9636c0b3e365fe144e11731a9628f5cfa034543d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 11 Jan 2018 13:14:47 +0100 Subject: Test some basic properties of outgoing mails --- tests/teststore.cpp | 13 +++++++++++++ tests/teststore.h | 1 + 2 files changed, 14 insertions(+) (limited to 'tests') 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) Q_ASSERT(false); return {}; } + +QVariantMap TestStore::read(const QVariant &object) +{ + using namespace Sink::ApplicationDomain; + QVariantMap map; + if (auto mail = object.value()) { + map.insert("subject", mail->getSubject()); + map.insert("draft", mail->getDraft()); + return map; + } + Q_ASSERT(false); + return {}; +} diff --git a/tests/teststore.h b/tests/teststore.h index e8fce6da..5df20416 100644 --- a/tests/teststore.h +++ b/tests/teststore.h @@ -28,6 +28,7 @@ class TestStore : public QObject { public: Q_INVOKABLE void setup(const QVariantMap &); Q_INVOKABLE QVariant load(const QByteArray &type, const QVariantMap &); + Q_INVOKABLE QVariantMap read(const QVariant &); }; } -- cgit v1.2.3