summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-22 07:18:56 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-22 07:18:56 (GMT)
commit3fbb06c246cc947177003d2bcf0dbe69e9fca3ce (patch)
tree0c546f8fc4c2fbf85f4dfb83a571a8f4a0a0ef89
parent5177e58109127954e2f348a1d9a1dcb632798452 (diff)
Add identity
-rw-r--r--messagecomposer/autotests/messagefactorytest.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/messagecomposer/autotests/messagefactorytest.cpp b/messagecomposer/autotests/messagefactorytest.cpp
index 3dd95b0..1bcc373 100644
--- a/messagecomposer/autotests/messagefactorytest.cpp
+++ b/messagecomposer/autotests/messagefactorytest.cpp
@@ -137,7 +137,8 @@ void MessageFactoryTest::testCreateReply()
{
KMime::Message::Ptr msg = createPlainTestMessage();
KIdentityManagement::IdentityManager *identMan = new KIdentityManagement::IdentityManager;
- identMan->newFromScratch(QStringLiteral("foo"));
+ KIdentityManagement::Identity ident = identMan->newFromScratch(QStringLiteral("foo"));
+ ident.setPrimaryEmailAddress(QStringLiteral("foo@foo.foo"));
identMan->commit();
MessageFactory factory(msg, 0);
@@ -200,6 +201,10 @@ void MessageFactoryTest::testCreateReplyUTF16Base64()
{
KMime::Message::Ptr msg = loadMessageFromFile(QStringLiteral("plain_utf16.mbox"));
KIdentityManagement::IdentityManager *identMan = new KIdentityManagement::IdentityManager;
+ KIdentityManagement::Identity ident = identMan->newFromScratch(QStringLiteral("foo"));
+ ident.setPrimaryEmailAddress(QStringLiteral("foo@foo.foo"));
+ identMan->commit();
+
TemplateParser::TemplateParserSettings::self()->setReplyUsingHtml(true);
// qDebug() << "plain base64 msg message:" << msg->encodedContent();
@@ -491,6 +496,9 @@ void MessageFactoryTest::test_multipartAlternative()
origMsg->parse();
KIdentityManagement::IdentityManager *identMan = new KIdentityManagement::IdentityManager;
+ KIdentityManagement::Identity ident = identMan->newFromScratch(QStringLiteral("foo"));
+ ident.setPrimaryEmailAddress(QStringLiteral("foo@foo.foo"));
+ identMan->commit();
MessageFactory factory(origMsg, 0);
factory.setIdentityManager(identMan);