summaryrefslogtreecommitdiffstats
path: root/tests/accountstest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-12 11:45:15 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-12 11:45:15 +0100
commit7daeec83233c522980d5e477fee82045de57f77d (patch)
tree5e03d11d23c764eb03f27393fcc37c0529405e10 /tests/accountstest.cpp
parentaf8baff21529b5bc47725da3e9e00ec81e5b6f1b (diff)
downloadsink-7daeec83233c522980d5e477fee82045de57f77d.tar.gz
sink-7daeec83233c522980d5e477fee82045de57f77d.zip
syncThen is no longer necessary
Diffstat (limited to 'tests/accountstest.cpp')
-rw-r--r--tests/accountstest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/accountstest.cpp b/tests/accountstest.cpp
index cce5c7b..0ab18ef 100644
--- a/tests/accountstest.cpp
+++ b/tests/accountstest.cpp
@@ -39,7 +39,7 @@ private slots:
39 account.setIcon(accountIcon); 39 account.setIcon(accountIcon);
40 Store::create(account).exec().waitForFinished(); 40 Store::create(account).exec().waitForFinished();
41 41
42 Store::fetchAll<SinkAccount>(Query()).syncThen<void, QList<SinkAccount::Ptr>>([&](const QList<SinkAccount::Ptr> &accounts) { 42 Store::fetchAll<SinkAccount>(Query()).then([&](const QList<SinkAccount::Ptr> &accounts) {
43 QCOMPARE(accounts.size(), 1); 43 QCOMPARE(accounts.size(), 1);
44 auto account = accounts.first(); 44 auto account = accounts.first();
45 QCOMPARE(account->getAccountType(), QString("maildir")); 45 QCOMPARE(account->getAccountType(), QString("maildir"));
@@ -60,7 +60,7 @@ private slots:
60 Store::create(resource).exec().waitForFinished(); 60 Store::create(resource).exec().waitForFinished();
61 61
62 62
63 Store::fetchAll<SinkResource>(Query()).syncThen<void, QList<SinkResource::Ptr>>([&](const QList<SinkResource::Ptr> &resources) { 63 Store::fetchAll<SinkResource>(Query()).then([&](const QList<SinkResource::Ptr> &resources) {
64 QCOMPARE(resources.size(), 1); 64 QCOMPARE(resources.size(), 1);
65 auto resource = resources.first(); 65 auto resource = resources.first();
66 QCOMPARE(resource->getResourceType(), QByteArray("sink.mailtransport")); 66 QCOMPARE(resource->getResourceType(), QByteArray("sink.mailtransport"));
@@ -74,7 +74,7 @@ private slots:
74 identity.setAccount(account.identifier()); 74 identity.setAccount(account.identifier());
75 Store::create(identity).exec().waitForFinished(); 75 Store::create(identity).exec().waitForFinished();
76 76
77 Store::fetchAll<Identity>(Query()).syncThen<void, QList<Identity::Ptr>>([&](const QList<Identity::Ptr> &identities) { 77 Store::fetchAll<Identity>(Query()).then([&](const QList<Identity::Ptr> &identities) {
78 QCOMPARE(identities.size(), 1); 78 QCOMPARE(identities.size(), 1);
79 QCOMPARE(identities.first()->getName(), smtpServer); 79 QCOMPARE(identities.first()->getName(), smtpServer);
80 QCOMPARE(identities.first()->getAddress(), smtpUsername); 80 QCOMPARE(identities.first()->getAddress(), smtpUsername);
@@ -85,7 +85,7 @@ private slots:
85 85
86 Store::remove(resource).exec().waitForFinished(); 86 Store::remove(resource).exec().waitForFinished();
87 87
88 Store::fetchAll<SinkResource>(Query()).syncThen<void, QList<SinkResource::Ptr>>([](const QList<SinkResource::Ptr> &resources) { 88 Store::fetchAll<SinkResource>(Query()).then([](const QList<SinkResource::Ptr> &resources) {
89 QCOMPARE(resources.size(), 0); 89 QCOMPARE(resources.size(), 0);
90 }) 90 })
91 .exec().waitForFinished(); 91 .exec().waitForFinished();