diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-03 11:26:08 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-03 11:26:08 +0200 |
commit | 672bbe1f10be056c1170bc227e16060edeff2481 (patch) | |
tree | 81cae3afea0797be17ef9fbd71213e1fcb31609d /tests/mailtest.cpp | |
parent | 709f24f25b6c22b1eafc323855ea166034110e0b (diff) | |
download | sink-672bbe1f10be056c1170bc227e16060edeff2481.tar.gz sink-672bbe1f10be056c1170bc227e16060edeff2481.zip |
Implemented imap flag changes.
Diffstat (limited to 'tests/mailtest.cpp')
-rw-r--r-- | tests/mailtest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/mailtest.cpp b/tests/mailtest.cpp index 912bb1c..9411f91 100644 --- a/tests/mailtest.cpp +++ b/tests/mailtest.cpp | |||
@@ -231,7 +231,7 @@ void MailTest::testMarkMailAsRead() | |||
231 | auto mail = Mail::create(mResourceInstanceIdentifier); | 231 | auto mail = Mail::create(mResourceInstanceIdentifier); |
232 | mail.setMimeMessage(message->encodedContent()); | 232 | mail.setMimeMessage(message->encodedContent()); |
233 | mail.setFolder(folder); | 233 | mail.setFolder(folder); |
234 | mail.setUnread(false); | 234 | mail.setUnread(true); |
235 | VERIFYEXEC(Store::create(mail)); | 235 | VERIFYEXEC(Store::create(mail)); |
236 | VERIFYEXEC(ResourceControl::flushMessageQueue(QByteArrayList() << mResourceInstanceIdentifier)); | 236 | VERIFYEXEC(ResourceControl::flushMessageQueue(QByteArrayList() << mResourceInstanceIdentifier)); |
237 | 237 | ||
@@ -241,10 +241,10 @@ void MailTest::testMarkMailAsRead() | |||
241 | .then<void, KAsync::Job<void>, QList<Mail::Ptr>>([this](const QList<Mail::Ptr> &mails) { | 241 | .then<void, KAsync::Job<void>, QList<Mail::Ptr>>([this](const QList<Mail::Ptr> &mails) { |
242 | ASYNCCOMPARE(mails.size(), 1); | 242 | ASYNCCOMPARE(mails.size(), 1); |
243 | auto mail = mails.first(); | 243 | auto mail = mails.first(); |
244 | mail->setUnread(true); | 244 | mail->setUnread(false); |
245 | return Store::modify(*mail) | 245 | return Store::modify(*mail) |
246 | .then<void>(ResourceControl::flushReplayQueue(QByteArrayList() << mResourceInstanceIdentifier)) // The change needs to be replayed already | 246 | .then<void>(ResourceControl::flushReplayQueue(QByteArrayList() << mResourceInstanceIdentifier)) // The change needs to be replayed already |
247 | .then(ResourceControl::inspect<Mail>(ResourceControl::Inspection::PropertyInspection(*mail, Mail::Unread::name, true))) | 247 | .then(ResourceControl::inspect<Mail>(ResourceControl::Inspection::PropertyInspection(*mail, Mail::Unread::name, false))) |
248 | .then(ResourceControl::inspect<Mail>(ResourceControl::Inspection::PropertyInspection(*mail, Mail::Subject::name, mail->getSubject()))); | 248 | .then(ResourceControl::inspect<Mail>(ResourceControl::Inspection::PropertyInspection(*mail, Mail::Subject::name, mail->getSubject()))); |
249 | }); | 249 | }); |
250 | VERIFYEXEC(job); | 250 | VERIFYEXEC(job); |
@@ -259,7 +259,7 @@ void MailTest::testMarkMailAsRead() | |||
259 | ASYNCCOMPARE(mails.size(), 1); | 259 | ASYNCCOMPARE(mails.size(), 1); |
260 | auto mail = mails.first(); | 260 | auto mail = mails.first(); |
261 | ASYNCVERIFY(!mail->getSubject().isEmpty()); | 261 | ASYNCVERIFY(!mail->getSubject().isEmpty()); |
262 | ASYNCCOMPARE(mail->getUnread(), true); | 262 | ASYNCCOMPARE(mail->getUnread(), false); |
263 | ASYNCVERIFY(QFileInfo(mail->getMimeMessagePath()).exists()); | 263 | ASYNCVERIFY(QFileInfo(mail->getMimeMessagePath()).exists()); |
264 | return KAsync::null<void>(); | 264 | return KAsync::null<void>(); |
265 | }); | 265 | }); |