diff options
Diffstat (limited to 'tests/test_mainwindow.cpp')
| -rw-r--r-- | tests/test_mainwindow.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_mainwindow.cpp b/tests/test_mainwindow.cpp index 2032793..887fead 100644 --- a/tests/test_mainwindow.cpp +++ b/tests/test_mainwindow.cpp @@ -543,6 +543,7 @@ private slots: void aCloseDuringTheCountdownIsRefused(); void aFailedSendKeepsTheTextThatFailedToGo(); void aSmallSizeLimitIsNotDescribedAsZeroMegabytes(); + void theBusinessSenderListIsLoadedAtStartup(); private: /// Owns the throwaway lock table init() points every test at. A pointer @@ -14886,4 +14887,21 @@ void TestMainWindow::aSmallSizeLimitIsNotDescribedAsZeroMegabytes() "1.5 MB lost its decimal"); } +void TestMainWindow::theBusinessSenderListIsLoadedAtStartup() +{ + QTemporaryDir dir; + const QString path = dir.filePath(QStringLiteral("business-senders")); + QFile file(path); + QVERIFY(file.open(QIODevice::WriteOnly | QIODevice::Text)); + file.write("@cofidis.it\n"); + file.close(); + + const Config config; + MainWindow window(config); + window.loadBusinessSenders(path); + + QVERIFY(window.businessSendersForTest().domains.contains( + QStringLiteral("cofidis.it"))); +} + #include "test_mainwindow.moc" |
