From 5162328cd8edba85017185ef5864b2b65f6f18ed Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 8 May 2016 22:57:41 +0200 Subject: 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. --- tests/maildirresourcetest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') 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: auto model = Sink::Store::loadModel(query); QTRY_VERIFY(model->data(QModelIndex(), Sink::Store::ChildrenFetchedRole).toBool()); - QCOMPARE(model->rowCount(QModelIndex()), 3); + QCOMPARE(model->rowCount(QModelIndex()), 4); QCOMPARE(model->match(model->index(0, 0, QModelIndex()), Qt::DisplayRole, QStringLiteral("newbox"), 1).size(), 1); } @@ -312,11 +312,11 @@ private slots: // Ensure all local data is processed Sink::ResourceControl::flushMessageQueue(query.resources).exec().waitForFinished(); - auto targetPath = tempDir.path() + "/maildir1/new"; + auto targetPath = tempDir.path() + "/maildir1/cur"; QDir dir(targetPath); dir.setFilter(QDir::Files); - QTRY_COMPARE(dir.count(), static_cast(1)); - QFile file(targetPath + "/" + dir.entryList().first()); + QTRY_COMPARE(dir.count(), static_cast(2)); + QFile file(targetPath + "/" + dir.entryList().last()); QVERIFY(file.open(QIODevice::ReadOnly)); KMime::Message m; m.setContent(file.readAll()); @@ -360,10 +360,10 @@ private slots: future2.waitForFinished(); QVERIFY(!future2.errorCode()); - auto targetPath = tempDir.path() + "/maildir1/newfolder/new"; + auto targetPath = tempDir.path() + "/maildir1/newfolder/cur"; QDir dir(targetPath); dir.setFilter(QDir::Files); - QTRY_COMPARE(dir.count(), static_cast(1)); + QCOMPARE(dir.count(), static_cast(1)); } void testRemoveMail() -- cgit v1.2.3