Commit af22110a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Improve autotest

parent 91dcfa35
Pipeline #42849 passed with stage
in 8 minutes and 44 seconds
......@@ -10,5 +10,5 @@ set(ldapclientsearchconfigreadconfigjobtest_source ldapclientsearchconfigreadcon
add_executable(ldapclientsearchconfigreadconfigjobtest ${ldapclientsearchconfigreadconfigjobtest_source})
add_test(NAME ldapclientsearchconfigreadconfigjobtest COMMAND ldapclientsearchconfigreadconfigjobtest)
ecm_mark_as_test(ldapclientsearchconfigreadconfigjobtest)
target_link_libraries(ldapclientsearchconfigreadconfigjobtest Qt5::Test KF5::Ldap)
target_link_libraries(ldapclientsearchconfigreadconfigjobtest Qt5::Test KF5::Ldap KF5::ConfigCore)
......@@ -5,6 +5,7 @@
*/
#include "ldapclientsearchconfigreadconfigjobtest.h"
#include "widgets/ldapclientsearchconfigreadconfigjob.h"
#include <QTest>
QTEST_MAIN(LdapClientSearchConfigReadConfigJobTest)
LdapClientSearchConfigReadConfigJobTest::LdapClientSearchConfigReadConfigJobTest(QObject *parent)
......@@ -12,3 +13,11 @@ LdapClientSearchConfigReadConfigJobTest::LdapClientSearchConfigReadConfigJobTest
{
}
void LdapClientSearchConfigReadConfigJobTest::shouldHaveDefaultValues()
{
KLDAP::LdapClientSearchConfigReadConfigJob job;
QVERIFY(!job.active());
QCOMPARE(job.serverIndex(), -1);
QVERIFY(!job.canStart());
}
......@@ -15,6 +15,8 @@ class LdapClientSearchConfigReadConfigJobTest : public QObject
public:
explicit LdapClientSearchConfigReadConfigJobTest(QObject *parent = nullptr);
~LdapClientSearchConfigReadConfigJobTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
};
#endif // LDAPCLIENTSEARCHCONFIGREADCONFIGJOBTEST_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment