summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/mimetreeparser/autotests/attachmenttest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-04 15:21:05 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-04 15:21:05 +0200
commit964f0003584a0b745045db75ca6184f54eddd859 (patch)
tree1019133d8c4a48cc90bb9c9091d626bc58e05cca /framework/src/domain/mime/mimetreeparser/autotests/attachmenttest.cpp
parente452707fdfbd61be1e5633b516b653b7337e7865 (diff)
downloadkube-964f0003584a0b745045db75ca6184f54eddd859.tar.gz
kube-964f0003584a0b745045db75ca6184f54eddd859.zip
Rely on isAttachment to collect attachments
Diffstat (limited to 'framework/src/domain/mime/mimetreeparser/autotests/attachmenttest.cpp')
-rw-r--r--framework/src/domain/mime/mimetreeparser/autotests/attachmenttest.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/autotests/attachmenttest.cpp b/framework/src/domain/mime/mimetreeparser/autotests/attachmenttest.cpp
index 47b5cbce..789c9049 100644
--- a/framework/src/domain/mime/mimetreeparser/autotests/attachmenttest.cpp
+++ b/framework/src/domain/mime/mimetreeparser/autotests/attachmenttest.cpp
@@ -22,6 +22,7 @@
22#include "setupenv.h" 22#include "setupenv.h"
23 23
24#include <qtest.h> 24#include <qtest.h>
25#include <QDebug>
25 26
26using namespace MimeTreeParser; 27using namespace MimeTreeParser;
27 28
@@ -58,10 +59,10 @@ void AttachmentTest::testEncryptedAttachment()
58 ObjectTreeParser otp(&nodeHelper); 59 ObjectTreeParser otp(&nodeHelper);
59 otp.parseObjectTree(msg.data()); 60 otp.parseObjectTree(msg.data());
60 otp.decryptParts(); 61 otp.decryptParts();
62 otp.print();
61 63
62 auto attachments = msg->attachments(); 64 auto attachmentParts = otp.collectAttachmentParts();
63 auto encAtts = nodeHelper.attachmentsOfExtraContents(); 65 QCOMPARE(attachmentParts.size(), 2);
64 QCOMPARE(attachments.size() + encAtts.size(), 2);
65} 66}
66 67
67#include "attachmenttest.moc" 68#include "attachmenttest.moc"