File indexing completed on 2025-03-09 04:54:27

0001 /*
0002    SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "dmarcrecordjobtest.h"
0008 #include "dkim-verify/dmarcrecordjob.h"
0009 #include <QTest>
0010 QTEST_GUILESS_MAIN(DMARCRecordJobTest)
0011 
0012 DMARCRecordJobTest::DMARCRecordJobTest(QObject *parent)
0013     : QObject(parent)
0014 {
0015 }
0016 
0017 void DMARCRecordJobTest::shouldHaveDefaultValues()
0018 {
0019     MessageViewer::DMARCRecordJob job;
0020     QVERIFY(!job.canStart());
0021     QVERIFY(job.domainName().isEmpty());
0022 }
0023 
0024 void DMARCRecordJobTest::shouldBeAbleToStart()
0025 {
0026     MessageViewer::DMARCRecordJob job;
0027     QVERIFY(!job.canStart());
0028     job.setDomainName(QStringLiteral("bla"));
0029     QVERIFY(job.canStart());
0030     job.setDomainName(QString());
0031     QVERIFY(!job.canStart());
0032 }
0033 
0034 #include "moc_dmarcrecordjobtest.cpp"