Commit 16a082f1 authored by Laurent Montel's avatar Laurent Montel 😁

Add autotest

parent 89272a0b
......@@ -18,6 +18,8 @@
*/
#include "includefilelineedittest.h"
#include "../includefilelineedit.h"
#include <QCompleter>
#include <QTest>
IncludeFileLineEditTest::IncludeFileLineEditTest(QObject *parent)
......@@ -26,4 +28,11 @@ IncludeFileLineEditTest::IncludeFileLineEditTest(QObject *parent)
}
void IncludeFileLineEditTest::shouldHaveDefaultValue()
{
KSieveUi::IncludeFileLineEdit w;
QCompleter *completer = w.findChild<QCompleter *>(QStringLiteral("completer"));
QVERIFY(completer);
}
QTEST_MAIN(IncludeFileLineEditTest)
......@@ -28,6 +28,8 @@ class IncludeFileLineEditTest : public QObject
public:
explicit IncludeFileLineEditTest(QObject *parent = nullptr);
~IncludeFileLineEditTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // INCLUDEFILELINEEDITTEST_H
......@@ -27,6 +27,8 @@ IncludeFileLineEdit::IncludeFileLineEdit(QWidget *parent)
: QLineEdit(parent)
{
mCompleter = new QCompleter(this);
mCompleter->setObjectName(QStringLiteral("completer"));
}
IncludeFileLineEdit::~IncludeFileLineEdit()
......
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