From 41782ea2be02cc92cf9e7eabc455ff2f14357236 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 12 Apr 2016 23:28:31 +0200 Subject: Fixed accounttest --- tests/accountstest.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/accountstest.cpp b/tests/accountstest.cpp index 8062bc3..626a262 100644 --- a/tests/accountstest.cpp +++ b/tests/accountstest.cpp @@ -41,8 +41,12 @@ private slots: account.setProperty("icon", accountIcon); Store::create(account).exec().waitForFinished(); - Store::fetchAll(Query()).then>([](const QList &accounts) { + Store::fetchAll(Query()).then>([&](const QList &accounts) { QCOMPARE(accounts.size(), 1); + auto account = accounts.first(); + QCOMPARE(account->getProperty("type").toString(), QString("maildir")); + QCOMPARE(account->getProperty("name").toString(), accountName); + QCOMPARE(account->getProperty("icon").toString(), accountIcon); }) .exec().waitForFinished(); @@ -60,8 +64,11 @@ private slots: Store::create(resource).exec().waitForFinished(); - Store::fetchAll(Query()).then>([](const QList &resources) { + Store::fetchAll(Query()).then>([&](const QList &resources) { QCOMPARE(resources.size(), 1); + auto resource = resources.first(); + QCOMPARE(resource->getProperty("type").toString(), QString("org.kde.mailtransport")); + QCOMPARE(resource->getProperty("server").toString(), smtpServer); }) .exec().waitForFinished(); -- cgit v1.2.3