Commit c1ef7312 authored by Christian Schoenebeck's avatar Christian Schoenebeck
Browse files

Add test for KMResendMessageCommand

Guard previous fix for resending an imported message by a test case,
as it's relying on working with a stand-alone message.

Add KMComandsTest as friend class to KMCommand, because this test is
checking KMCommand::retrievedMsgs().isEmpty() for determining the
result of the test, which is actually a protected method.
parent 57ecb525
Pipeline #238518 passed with stage
in 8 minutes and 38 seconds
......@@ -214,6 +214,20 @@ void KMCommandsTest::testReplyWithoutDefaultGPGSign()
void KMCommandsTest::testSendAgain()
const KIdentityManagement::Identity &ident = mKernel->identityManager()->defaultIdentity();
Akonadi::Item item(createItem(ident));
auto cmd(new KMResendMessageCommand(nullptr, item));
void KMCommandsTest::waitForMainWindowToClose()
KMainWindow *w = mKernel->mainWin();
......@@ -20,6 +20,7 @@ private Q_SLOTS:
void testMailtoReply();
void testReply();
void testReplyWithoutDefaultGPGSign();
void testSendAgain();
void initTestCase();
......@@ -161,6 +161,9 @@ private:
QWidget *const mParent;
Akonadi::Item::List mMsgList;
Akonadi::ItemFetchScope mFetchScope;
// grant super power to test cases
friend class KMCommandsTest;
class KMAILTESTS_TESTS_EXPORT KMMailtoComposeCommand : public KMCommand
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