File indexing completed on 2024-06-09 04:58:58

0001 /*
0002    SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "channellistviewtest.h"
0008 #include "channellist/channellistview.h"
0009 #include "model/roomfilterproxymodel.h"
0010 #include <QTest>
0011 
0012 QTEST_MAIN(ChannelListViewTest)
0013 ChannelListViewTest::ChannelListViewTest(QObject *parent)
0014     : QObject(parent)
0015 {
0016 }
0017 
0018 void ChannelListViewTest::shouldHaveDefaultValues()
0019 {
0020     ChannelListView w;
0021     QCOMPARE(w.horizontalScrollBarPolicy(), Qt::ScrollBarAlwaysOff);
0022     QCOMPARE(w.itemDelegate()->objectName(), QStringLiteral("mChannelListDelegate"));
0023     QCOMPARE(w.isHeaderHidden(), true);
0024     QCOMPARE(w.rootIsDecorated(), false);
0025     QCOMPARE(w.uniformRowHeights(), true);
0026     QCOMPARE(w.itemsExpandable(), false);
0027     QCOMPARE(w.indentation(), 0);
0028     QVERIFY(w.filterModel());
0029     QCOMPARE(w.filterModel()->objectName(), QStringLiteral("mRoomFilterProxyModel"));
0030 }
0031 
0032 #include "moc_channellistviewtest.cpp"