From bd1622c27e744971b8fc70b90e9c9d175acec2f2 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 10 Apr 2016 11:00:57 +0200 Subject: Use the MailtransportResource for mailtransport. --- accounts/maildir/tests/settingstest.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'accounts/maildir/tests') diff --git a/accounts/maildir/tests/settingstest.cpp b/accounts/maildir/tests/settingstest.cpp index 8f8471f0..07665c24 100644 --- a/accounts/maildir/tests/settingstest.cpp +++ b/accounts/maildir/tests/settingstest.cpp @@ -23,14 +23,20 @@ private slots: { auto accountId = "accountid"; auto maildirPath = QDir::tempPath(); + auto smtpServer = QString("smtpserver"); + auto smtpUsername = QString("username"); + auto smtpPassword = QString("password"); MaildirSettings settings; settings.setAccountIdentifier(accountId); settings.setPath(maildirPath); + settings.setProperty("smtpServer", smtpServer); + settings.setProperty("smtpUsername", smtpUsername); + settings.setProperty("smtpPassword", smtpPassword); settings.save(); Sink::Store::fetchAll(Sink::Query()).then>([](const QList &resources) { - QCOMPARE(resources.size(), 1); + QCOMPARE(resources.size(), 2); }) .exec().waitForFinished(); @@ -38,10 +44,15 @@ private slots: { MaildirSettings readSettings; QSignalSpy spy(&readSettings, &MaildirSettings::pathChanged); + QSignalSpy spy1(&readSettings, &MaildirSettings::smtpResourceChanged); readSettings.setAccountIdentifier(accountId); QTRY_VERIFY(spy.count()); + QTRY_VERIFY(spy1.count()); QVERIFY(!readSettings.accountIdentifier().isEmpty()); QCOMPARE(readSettings.path().toString(), maildirPath); + QCOMPARE(readSettings.property("smtpServer").toString(), smtpServer); + QCOMPARE(readSettings.property("smtpUsername").toString(), smtpUsername); + QCOMPARE(readSettings.property("smtpPassword").toString(), smtpPassword); } { -- cgit v1.2.3