File indexing completed on 2025-01-19 04:46:51

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 "dkimconfigurewidgettest.h"
0008 #include "../dkimconfiguretab.h"
0009 #include "../dkimconfigurewidget.h"
0010 #include <QStandardPaths>
0011 #include <QTest>
0012 #include <QVBoxLayout>
0013 
0014 QTEST_MAIN(DKIMConfigureWidgetTest)
0015 
0016 DKIMConfigureWidgetTest::DKIMConfigureWidgetTest(QObject *parent)
0017     : QObject(parent)
0018 {
0019     QStandardPaths::setTestModeEnabled(true);
0020 }
0021 
0022 void DKIMConfigureWidgetTest::shouldHaveDefaultValue()
0023 {
0024     DKIMConfigureWidget w;
0025     auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout"));
0026     QVERIFY(mainLayout);
0027     QCOMPARE(mainLayout->contentsMargins(), QMargins());
0028 
0029     auto mTabWidget = w.findChild<DKIMConfigureTab *>(QStringLiteral("tabwidget"));
0030     QVERIFY(mTabWidget);
0031 }
0032 
0033 #include "moc_dkimconfigurewidgettest.cpp"