diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-26 16:13:06 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-26 16:13:06 +0200 |
| commit | 409faeadf013952420963fa1b740d44526d8a95e (patch) | |
| tree | fdfc02bf1dd4321f6fcab110e7205835ecdb51c9 /tests/test_mainwindow.cpp | |
| parent | bd90331cba3633754482fc13b99ae39a3b5f79a2 (diff) | |
| download | qtmaildir-409faeadf013952420963fa1b740d44526d8a95e.tar.gz qtmaildir-409faeadf013952420963fa1b740d44526d8a95e.zip | |
feat: load the business-senders list at startup
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" |
