File indexing completed on 2025-01-12 04:52:08
0001 /* 0002 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "exportmailfolderattributejobtest.h" 0008 #include <QSignalSpy> 0009 #include <QTest> 0010 QTEST_GUILESS_MAIN(ExportMailFolderAttributeJobTest) 0011 0012 ExportMailFolderAttributeJobTest::ExportMailFolderAttributeJobTest(QObject *parent) 0013 : QObject{parent} 0014 { 0015 } 0016 0017 void ExportMailFolderAttributeJobTest::shouldHaveDefaultValues() 0018 { 0019 ExportMailFolderAttributeJobImplTest job; 0020 QVERIFY(!job.canStart()); 0021 } 0022 0023 void ExportMailFolderAttributeJobTest::shouldEmitSignal() 0024 { 0025 // Emit signal when we can't start. 0026 ExportMailFolderAttributeJobImplTest job; 0027 QSignalSpy spyFinished(&job, &ExportMailFolderAttributeJobImplTest::failed); 0028 job.start(); 0029 QCOMPARE(spyFinished.count(), 1); 0030 } 0031 0032 ExportMailFolderAttributeJobImplTest::ExportMailFolderAttributeJobImplTest(QObject *parent) 0033 : ExportMailFolderAttributeJob(parent) 0034 { 0035 } 0036 0037 #include "moc_exportmailfolderattributejobtest.cpp"