File indexing completed on 2024-12-22 04:45:34

0001 /*
0002    SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #include "customuserstatustreewidgettest.h"
0007 #include "administratordialog/customuserstatus/customuserstatustreewidget.h"
0008 #include <QHeaderView>
0009 #include <QTest>
0010 QTEST_MAIN(CustomUserStatusTreeWidgetTest)
0011 
0012 CustomUserStatusTreeWidgetTest::CustomUserStatusTreeWidgetTest(QObject *parent)
0013     : QObject(parent)
0014 {
0015 }
0016 
0017 void CustomUserStatusTreeWidgetTest::shouldHaveDefaultValues()
0018 {
0019     CustomUserStatusTreeWidget w(nullptr);
0020     QCOMPARE(w.columnCount(), 2);
0021     QVERIFY(w.alternatingRowColors());
0022     QCOMPARE(w.contextMenuPolicy(), Qt::CustomContextMenu);
0023     QCOMPARE(w.selectionMode(), QTreeWidget::SingleSelection);
0024     QVERIFY(!w.header()->sectionsMoved());
0025     QVERIFY(!w.rootIsDecorated());
0026 }
0027 
0028 #include "moc_customuserstatustreewidgettest.cpp"