File indexing completed on 2024-12-22 04:45:35
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "moderationmessageinfowidgettest.h" 0008 #include "administratordialog/moderationconsole/moderationmessageinfowidget.h" 0009 #include "administratordialog/moderationconsole/moderationreportinfowidget.h" 0010 #include <QTest> 0011 #include <QVBoxLayout> 0012 0013 QTEST_MAIN(ModerationMessageInfoWidgetTest) 0014 ModerationMessageInfoWidgetTest::ModerationMessageInfoWidgetTest(QObject *parent) 0015 : QObject{parent} 0016 { 0017 } 0018 0019 void ModerationMessageInfoWidgetTest::shouldHaveDefaultValues() 0020 { 0021 ModerationMessageInfoWidget d(nullptr); 0022 auto mainLayout = d.findChild<QVBoxLayout *>(QStringLiteral("mainLayout")); 0023 QVERIFY(mainLayout); 0024 QCOMPARE(mainLayout->contentsMargins(), QMargins{}); 0025 0026 auto mModerationReportInfoWidget = d.findChild<ModerationReportInfoWidget *>(QStringLiteral("mModerationReportInfoWidget")); 0027 QVERIFY(mModerationReportInfoWidget); 0028 } 0029 0030 #include "moc_moderationmessageinfowidgettest.cpp"