Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kalendar
Commits
046d33f7
Commit
046d33f7
authored
Oct 16, 2022
by
Claudio Cambra
Browse files
Add explainer for weird fail case in mailtemplatetest and added alternate test
Signed-off-by:
Claudio Cambra
<
claudio.cambra@gmail.com
>
parent
ddc9ead3
Pipeline
#248576
failed with stage
in 2 minutes and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mail/mime/tests/mailtemplatetest.cpp
View file @
046d33f7
...
...
@@ -593,12 +593,21 @@ private Q_SLOTS:
QCOMPARE
(
result
->
contentType
()
->
mimeType
(),
QByteArray
{
"multipart/alternative"
});
QCOMPARE
(
result
->
attachments
().
size
(),
1
);
// FIXME: KMime should return 0 for this multipart but it doesn't sometimes(?)
// It is an attachment as the ical part:
// A) Has a name
// B) Has a content disposition of CDattachment
//
// Check the result of QVERIFY(KMime::isAttachment(result->contents()[1])); if
// it is true then this confirms that result->attachments() is misreporting
QEXPECT_FAIL
(
""
,
"Should be recognised as an attachment"
,
TestFailMode
::
Continue
);
QCOMPARE
(
result
->
attachments
().
count
(),
1
);
QCOMPARE
(
result
->
contents
().
size
(),
2
);
QVERIFY
(
result
->
contents
()[
0
]
->
contentType
()
->
isMimeType
(
"text/plain"
));
QVERIFY
(
result
->
contents
()[
1
]
->
contentType
()
->
isMimeType
(
"text/calendar"
));
QCOMPARE
(
result
->
contents
()[
1
]
->
contentType
()
->
name
(),
QLatin1String
{
"event.ics"
});
QVERIFY
(
KMime
::
isAttachment
(
result
->
contents
()[
1
]));
}
void
testEncryptedWithProtectedHeadersReply
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment