summaryrefslogtreecommitdiffstats
path: root/examples/imapresource/tests
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-02 13:35:40 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-02 13:35:40 +0200
commit855a878bcc124f8949586b3656dcc6e545e18dc0 (patch)
tree6497f1710ba3db8953d204032e5e8c14a239ad33 /examples/imapresource/tests
parent64a1b21a7b11d640f0ebd37184aeb14a4d9e12db (diff)
downloadsink-855a878bcc124f8949586b3656dcc6e545e18dc0.tar.gz
sink-855a878bcc124f8949586b3656dcc6e545e18dc0.zip
Always return jobs, not futures.
Otherwise the calls are not composable.
Diffstat (limited to 'examples/imapresource/tests')
-rw-r--r--examples/imapresource/tests/imapserverproxytest.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/examples/imapresource/tests/imapserverproxytest.cpp b/examples/imapresource/tests/imapserverproxytest.cpp
index b30cc33..3761dac 100644
--- a/examples/imapresource/tests/imapserverproxytest.cpp
+++ b/examples/imapresource/tests/imapserverproxytest.cpp
@@ -80,18 +80,13 @@ private slots:
80 { 80 {
81 ImapServerProxy imap("localhost", 993); 81 ImapServerProxy imap("localhost", 993);
82 VERIFYEXEC(imap.login("doe", "doe")); 82 VERIFYEXEC(imap.login("doe", "doe"));
83 auto future = imap.fetchFolders([](const QVector<Folder> &){}); 83 VERIFYEXEC(imap.fetchFolders([](const QVector<Folder> &){}));
84 future.waitForFinished();
85 QVERIFY(!future.errorCode());
86 } 84 }
87 85
88 void testFetchFoldersFailure() 86 void testFetchFoldersFailure()
89 { 87 {
90 ImapServerProxy imap("foobar", 993); 88 ImapServerProxy imap("foobar", 993);
91 auto future = imap.fetchFolders([](const QVector<Folder> &){}); 89 VERIFYEXEC_FAIL(imap.fetchFolders([](const QVector<Folder> &){}));
92 auto future2 = future;
93 future2.waitForFinished();
94 QVERIFY(future2.errorCode());
95 } 90 }
96 91
97 void testFetchMail() 92 void testFetchMail()