diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-08 22:57:41 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-08 23:00:00 +0200 |
commit | 5162328cd8edba85017185ef5864b2b65f6f18ed (patch) | |
tree | 371256e6bf76e1603e2fe08e1c04bff33ecd604c /tests/maildirresourcetest.cpp | |
parent | 7744e638441fe93ee28bab80c2339e12a8f318d4 (diff) | |
download | sink-5162328cd8edba85017185ef5864b2b65f6f18ed.tar.gz sink-5162328cd8edba85017185ef5864b2b65f6f18ed.zip |
Move mimeMessage in preprocessor, and directly move to cur.
We use the maildir as our internal storage, so the message needs to be
moved immediately and not only with changereplay.
Diffstat (limited to 'tests/maildirresourcetest.cpp')
-rw-r--r-- | tests/maildirresourcetest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/maildirresourcetest.cpp b/tests/maildirresourcetest.cpp index 372ca5d..ec685a6 100644 --- a/tests/maildirresourcetest.cpp +++ b/tests/maildirresourcetest.cpp | |||
@@ -196,7 +196,7 @@ private slots: | |||
196 | 196 | ||
197 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); | 197 | auto model = Sink::Store::loadModel<Sink::ApplicationDomain::Folder>(query); |
198 | QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); | 198 | QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); |
199 | QCOMPARE(model->rowCount(QModelIndex()), 3); | 199 | QCOMPARE(model->rowCount(QModelIndex()), 4); |
200 | QCOMPARE(model->match(model->index(0, 0, QModelIndex()), Qt::DisplayRole, QStringLiteral("newbox"), 1).size(), 1); | 200 | QCOMPARE(model->match(model->index(0, 0, QModelIndex()), Qt::DisplayRole, QStringLiteral("newbox"), 1).size(), 1); |
201 | } | 201 | } |
202 | 202 | ||
@@ -312,11 +312,11 @@ private slots: | |||
312 | // Ensure all local data is processed | 312 | // Ensure all local data is processed |
313 | Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); | 313 | Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); |
314 | 314 | ||
315 | auto targetPath = tempDir.path() + "/maildir1/new"; | 315 | auto targetPath = tempDir.path() + "/maildir1/cur"; |
316 | QDir dir(targetPath); | 316 | QDir dir(targetPath); |
317 | dir.setFilter(QDir::Files); | 317 | dir.setFilter(QDir::Files); |
318 | QTRY_COMPARE(dir.count(), static_cast<unsigned int>(1)); | 318 | QTRY_COMPARE(dir.count(), static_cast<unsigned int>(2)); |
319 | QFile file(targetPath + "/" + dir.entryList().first()); | 319 | QFile file(targetPath + "/" + dir.entryList().last()); |
320 | QVERIFY(file.open(QIODevice::ReadOnly)); | 320 | QVERIFY(file.open(QIODevice::ReadOnly)); |
321 | KMime::Message m; | 321 | KMime::Message m; |
322 | m.setContent(file.readAll()); | 322 | m.setContent(file.readAll()); |
@@ -360,10 +360,10 @@ private slots: | |||
360 | future2.waitForFinished(); | 360 | future2.waitForFinished(); |
361 | QVERIFY(!future2.errorCode()); | 361 | QVERIFY(!future2.errorCode()); |
362 | 362 | ||
363 | auto targetPath = tempDir.path() + "/maildir1/newfolder/new"; | 363 | auto targetPath = tempDir.path() + "/maildir1/newfolder/cur"; |
364 | QDir dir(targetPath); | 364 | QDir dir(targetPath); |
365 | dir.setFilter(QDir::Files); | 365 | dir.setFilter(QDir::Files); |
366 | QTRY_COMPARE(dir.count(), static_cast<unsigned int>(1)); | 366 | QCOMPARE(dir.count(), static_cast<unsigned int>(1)); |
367 | } | 367 | } |
368 | 368 | ||
369 | void testRemoveMail() | 369 | void testRemoveMail() |