File indexing completed on 2025-01-05 04:49:50

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "selectimapfoldermodeltest.h"
0008 #include "../selectimapfoldermodel.h"
0009 #include <KSieveCore/SieveImapAccountSettings>
0010 #include <QTest>
0011 
0012 SelectImapFolderModelTest::SelectImapFolderModelTest(QObject *parent)
0013     : QObject(parent)
0014 {
0015 }
0016 
0017 SelectImapFolderModelTest::~SelectImapFolderModelTest() = default;
0018 
0019 void SelectImapFolderModelTest::shouldNotCreateModelIfAccountIsNotValid()
0020 {
0021     SelectImapFolderModel model;
0022     KSieveCore::SieveImapAccountSettings account;
0023     QVERIFY(!account.isValid());
0024     bool modelIsInitialized = false;
0025     QVERIFY(!model.folderModel(account, modelIsInitialized));
0026     QVERIFY(!modelIsInitialized);
0027 }
0028 
0029 QTEST_MAIN(SelectImapFolderModelTest)
0030 
0031 #include "moc_selectimapfoldermodeltest.cpp"