Commit 924da80c authored by Laurent Montel's avatar Laurent Montel 😁

Improve autotests

parent 8f43a525
......@@ -24,6 +24,8 @@
#include "customfieldswidgettest.h"
#include "../customfieldswidget.h"
#include <QTest>
#include <editor/customfieldeditor/customfieldeditorwidget.h>
#include <editor/customfieldeditor/customfieldslistwidget.h>
CustomFieldsWidgetTest::CustomFieldsWidgetTest(QObject *parent)
: QObject(parent)
......@@ -36,4 +38,14 @@ CustomFieldsWidgetTest::~CustomFieldsWidgetTest()
}
void CustomFieldsWidgetTest::shouldHaveDefaultValue()
{
Akonadi::CustomFieldsWidget w;
Akonadi::CustomFieldEditorWidget *customFieldEditorWidget = w.findChild<Akonadi::CustomFieldEditorWidget *>(QStringLiteral("customfieldeditorwidget"));
QVERIFY(customFieldEditorWidget);
Akonadi::CustomFieldsListWidget *customFieldsListWidget = w.findChild<Akonadi::CustomFieldsListWidget *>(QStringLiteral("customfieldslistwidget"));
QVERIFY(customFieldsListWidget);
}
QTEST_MAIN(CustomFieldsWidgetTest)
......@@ -32,6 +32,8 @@ class CustomFieldsWidgetTest : public QObject
public:
explicit CustomFieldsWidgetTest(QObject *parent = Q_NULLPTR);
~CustomFieldsWidgetTest();
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // CUSTOMFIELDSWIDGETTEST_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