File indexing completed on 2024-12-01 04:35:26
0001 /* 0002 SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "rocketchataccountfilterproxymodeltest.h" 0008 #include "model/rocketchataccountfilterproxymodel.h" 0009 #include "model/rocketchataccountmodel.h" 0010 #include <QTest> 0011 0012 QTEST_GUILESS_MAIN(RocketChatAccountFilterProxyModelTest) 0013 0014 RocketChatAccountFilterProxyModelTest::RocketChatAccountFilterProxyModelTest(QObject *parent) 0015 : QObject(parent) 0016 { 0017 } 0018 0019 void RocketChatAccountFilterProxyModelTest::shouldHaveDefaultValue() 0020 { 0021 RocketChatAccountFilterProxyModel w; 0022 RocketChatAccountModel sourceModel; 0023 w.setSourceModel(&sourceModel); 0024 QCOMPARE(w.rowCount(), 0); 0025 QVERIFY(w.sourceModel()); 0026 QCOMPARE(w.sourceModel(), &sourceModel); 0027 QVERIFY(w.accountOrder().isEmpty()); 0028 } 0029 0030 #include "moc_rocketchataccountfilterproxymodeltest.cpp"