From 92d6fbd8f6a504da869454ca85f861e30c89a73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20Knau=C3=9F?= Date: Tue, 2 Aug 2016 18:14:00 +0200 Subject: make signs & encrytiopn work --- framework/domain/mimetreeparser/tests/interfacetest.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'framework/domain/mimetreeparser/tests/interfacetest.cpp') diff --git a/framework/domain/mimetreeparser/tests/interfacetest.cpp b/framework/domain/mimetreeparser/tests/interfacetest.cpp index fb073fc1..ac77b025 100644 --- a/framework/domain/mimetreeparser/tests/interfacetest.cpp +++ b/framework/domain/mimetreeparser/tests/interfacetest.cpp @@ -145,6 +145,8 @@ private slots: QCOMPARE(contentList.size(), 1); QCOMPARE(contentList[0]->content(), QStringLiteral("The quick brown fox jumped over the lazy dog.").toLocal8Bit()); QCOMPARE(contentList[0]->charset(), QStringLiteral("utf-8").toLocal8Bit()); + QCOMPARE(contentList[0]->encryptions().size(), 1); + QCOMPARE(contentList[0]->signatures().size(), 0); auto contentAttachmentList = parser.collectAttachmentParts(); QCOMPARE(contentAttachmentList.size(), 0); } @@ -162,12 +164,18 @@ private slots: QCOMPARE(contentList.size(), 1); QCOMPARE(contentList[0]->content(), QStringLiteral("test text").toLocal8Bit()); QCOMPARE(contentList[0]->charset(), QStringLiteral("utf-8").toLocal8Bit()); + QCOMPARE(contentList[0]->encryptions().size(), 1); + QCOMPARE(contentList[0]->signatures().size(), 1); auto contentAttachmentList = parser.collectAttachmentParts(); QCOMPARE(contentAttachmentList.size(), 2); QCOMPARE(contentAttachmentList[0]->availableContents(), QVector() << "text/plain"); QCOMPARE(contentAttachmentList[0]->content().size(), 1); + QCOMPARE(contentAttachmentList[0]->encryptions().size(), 1); + QCOMPARE(contentAttachmentList[0]->signatures().size(), 1); QCOMPARE(contentAttachmentList[1]->availableContents(), QVector() << "image/png"); QCOMPARE(contentAttachmentList[1]->content().size(), 1); + QCOMPARE(contentAttachmentList[1]->encryptions().size(), 0); + QCOMPARE(contentAttachmentList[1]->signatures().size(), 0); } void testOpenPPGInline() @@ -179,10 +187,14 @@ private slots: auto contentPart = contentPartList[0]; QVERIFY((bool)contentPart); QCOMPARE(contentPart->availableContents(), QVector() << "plaintext"); + QCOMPARE(contentPart->encryptions().size(), 0); + QCOMPARE(contentPart->signatures().size(), 0); auto contentList = contentPart->content("plaintext"); QCOMPARE(contentList.size(), 1); QCOMPARE(contentList[0]->content(), QStringLiteral("asdasd asd asd asdf sadf sdaf sadf äöü").toLocal8Bit()); QCOMPARE(contentList[0]->charset(), QStringLiteral("utf-8").toLocal8Bit()); + QCOMPARE(contentList[0]->encryptions().size(), 1); + QCOMPARE(contentList[0]->signatures().size(), 1); auto contentAttachmentList = parser.collectAttachmentParts(); QCOMPARE(contentAttachmentList.size(), 0); } -- cgit v1.2.3