Commit 2453bf6d authored by David Faure's avatar David Faure
Browse files

Add unittest for MessageViewer::Viewer::setMessage

Simple enough, but it already found 3 bugs...
parent 3bf2890a
......@@ -70,4 +70,27 @@ void ViewerTest::shouldHaveDefaultValuesOnCreation()
delete viewer;
void ViewerTest::shouldDisplayMessage()
QByteArray data =
"From: Konqui <>\n"
"To: Friends <>\n"
"Date: Sun, 21 Mar 1993 23:56:48 -0800 (PST)\n"
"Subject: Sample message\n"
"MIME-Version: 1.0\n"
"Content-type: text/plain; charset=us-ascii\n"
"This is a test message.\n"
KMime::Message::Ptr msgPtr = KMime::Message::Ptr(new KMime::Message());
MessageViewer::Viewer viewer(0, 0, new KActionCollection(this));
viewer.setMessage(msgPtr, MimeTreeParser::Force);
// not sure what to check, but at least we check it neither crashes nor hangs
......@@ -26,6 +26,7 @@ public:
private Q_SLOTS:
void shouldHaveDefaultValuesOnCreation();
void shouldDisplayMessage();
#endif // VIEWERTEST_H
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment