File indexing completed on 2024-11-10 04:50:01

0001 /*
0002   SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-only
0005 */
0006 
0007 #include "invalidfilterwidgettest.h"
0008 #include "../filter/invalidfilters/invalidfilterlistview.h"
0009 #include "../filter/invalidfilters/invalidfilterwidget.h"
0010 #include <QLabel>
0011 #include <QTest>
0012 InvalidFilterWidgetTest::InvalidFilterWidgetTest(QObject *parent)
0013     : QObject(parent)
0014 {
0015 }
0016 
0017 InvalidFilterWidgetTest::~InvalidFilterWidgetTest() = default;
0018 
0019 void InvalidFilterWidgetTest::shouldHaveDefaultValue()
0020 {
0021     MailCommon::InvalidFilterWidget w;
0022     auto lab = w.findChild<QLabel *>(QStringLiteral("label"));
0023     QVERIFY(lab);
0024 
0025     auto list = w.findChild<MailCommon::InvalidFilterListView *>(QStringLiteral("invalidfilterlist"));
0026     QVERIFY(list);
0027 }
0028 
0029 QTEST_MAIN(InvalidFilterWidgetTest)
0030 
0031 #include "moc_invalidfilterwidgettest.cpp"