diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-04-12 23:28:31 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-04-12 23:28:31 +0200 |
commit | 41782ea2be02cc92cf9e7eabc455ff2f14357236 (patch) | |
tree | 0829bab189e0de06b3d268b44aa0cf682c3db475 /tests/accountstest.cpp | |
parent | 081db4108d2d76203c815317aff1adee16edf328 (diff) | |
download | sink-41782ea2be02cc92cf9e7eabc455ff2f14357236.tar.gz sink-41782ea2be02cc92cf9e7eabc455ff2f14357236.zip |
Fixed accounttest
Diffstat (limited to 'tests/accountstest.cpp')
-rw-r--r-- | tests/accountstest.cpp | 11 |
1 files 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: | |||
41 | account.setProperty("icon", accountIcon); | 41 | account.setProperty("icon", accountIcon); |
42 | Store::create(account).exec().waitForFinished(); | 42 | Store::create(account).exec().waitForFinished(); |
43 | 43 | ||
44 | Store::fetchAll<SinkAccount>(Query()).then<void, QList<SinkAccount>>([](const QList<SinkAccount> &accounts) { | 44 | Store::fetchAll<SinkAccount>(Query()).then<void, QList<SinkAccount::Ptr>>([&](const QList<SinkAccount::Ptr> &accounts) { |
45 | QCOMPARE(accounts.size(), 1); | 45 | QCOMPARE(accounts.size(), 1); |
46 | auto account = accounts.first(); | ||
47 | QCOMPARE(account->getProperty("type").toString(), QString("maildir")); | ||
48 | QCOMPARE(account->getProperty("name").toString(), accountName); | ||
49 | QCOMPARE(account->getProperty("icon").toString(), accountIcon); | ||
46 | }) | 50 | }) |
47 | .exec().waitForFinished(); | 51 | .exec().waitForFinished(); |
48 | 52 | ||
@@ -60,8 +64,11 @@ private slots: | |||
60 | Store::create(resource).exec().waitForFinished(); | 64 | Store::create(resource).exec().waitForFinished(); |
61 | 65 | ||
62 | 66 | ||
63 | Store::fetchAll<SinkResource>(Query()).then<void, QList<SinkResource>>([](const QList<SinkResource> &resources) { | 67 | Store::fetchAll<SinkResource>(Query()).then<void, QList<SinkResource::Ptr>>([&](const QList<SinkResource::Ptr> &resources) { |
64 | QCOMPARE(resources.size(), 1); | 68 | QCOMPARE(resources.size(), 1); |
69 | auto resource = resources.first(); | ||
70 | QCOMPARE(resource->getProperty("type").toString(), QString("org.kde.mailtransport")); | ||
71 | QCOMPARE(resource->getProperty("server").toString(), smtpServer); | ||
65 | }) | 72 | }) |
66 | .exec().waitForFinished(); | 73 | .exec().waitForFinished(); |
67 | 74 | ||