diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-27 02:26:47 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-09-15 16:14:19 +0200 |
commit | 26816c21f60450e461a5b6ef4ef740f6070ce278 (patch) | |
tree | 55e8aee03e094abf702438e6cd26233047345e70 /tests/accountstest.cpp | |
parent | 9a9bb39f7641a818434cafa0dae0c8aa47124c0b (diff) | |
download | sink-26816c21f60450e461a5b6ef4ef740f6070ce278.tar.gz sink-26816c21f60450e461a5b6ef4ef740f6070ce278.zip |
Ported to the kasync revamp
Diffstat (limited to 'tests/accountstest.cpp')
-rw-r--r-- | tests/accountstest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/accountstest.cpp b/tests/accountstest.cpp index 4be8bd6..e0a99c2 100644 --- a/tests/accountstest.cpp +++ b/tests/accountstest.cpp | |||
@@ -39,7 +39,7 @@ private slots: | |||
39 | account.setProperty("icon", accountIcon); | 39 | account.setProperty("icon", accountIcon); |
40 | Store::create(account).exec().waitForFinished(); | 40 | Store::create(account).exec().waitForFinished(); |
41 | 41 | ||
42 | Store::fetchAll<SinkAccount>(Query()).then<void, QList<SinkAccount::Ptr>>([&](const QList<SinkAccount::Ptr> &accounts) { | 42 | Store::fetchAll<SinkAccount>(Query()).syncThen<void, QList<SinkAccount::Ptr>>([&](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->getProperty("type").toString(), QString("maildir")); | 45 | QCOMPARE(account->getProperty("type").toString(), 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()).then<void, QList<SinkResource::Ptr>>([&](const QList<SinkResource::Ptr> &resources) { | 63 | Store::fetchAll<SinkResource>(Query()).syncThen<void, QList<SinkResource::Ptr>>([&](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->getProperty("type").toString(), QString("sink.mailtransport")); | 66 | QCOMPARE(resource->getProperty("type").toString(), QString("sink.mailtransport")); |
@@ -74,7 +74,7 @@ private slots: | |||
74 | identity.setProperty("account", account.identifier()); | 74 | identity.setProperty("account", account.identifier()); |
75 | Store::create(identity).exec().waitForFinished(); | 75 | Store::create(identity).exec().waitForFinished(); |
76 | 76 | ||
77 | Store::fetchAll<Identity>(Query()).then<void, QList<Identity::Ptr>>([&](const QList<Identity::Ptr> &identities) { | 77 | Store::fetchAll<Identity>(Query()).syncThen<void, QList<Identity::Ptr>>([&](const QList<Identity::Ptr> &identities) { |
78 | QCOMPARE(identities.size(), 1); | 78 | QCOMPARE(identities.size(), 1); |
79 | }) | 79 | }) |
80 | .exec().waitForFinished(); | 80 | .exec().waitForFinished(); |
@@ -82,7 +82,7 @@ private slots: | |||
82 | 82 | ||
83 | Store::remove(resource).exec().waitForFinished(); | 83 | Store::remove(resource).exec().waitForFinished(); |
84 | 84 | ||
85 | Store::fetchAll<SinkResource>(Query()).then<void, QList<SinkResource::Ptr>>([](const QList<SinkResource::Ptr> &resources) { | 85 | Store::fetchAll<SinkResource>(Query()).syncThen<void, QList<SinkResource::Ptr>>([](const QList<SinkResource::Ptr> &resources) { |
86 | QCOMPARE(resources.size(), 0); | 86 | QCOMPARE(resources.size(), 0); |
87 | }) | 87 | }) |
88 | .exec().waitForFinished(); | 88 | .exec().waitForFinished(); |