summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-28 05:44:57 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-28 05:44:57 (GMT)
commit62743517a2a5e0857addb07f665c0582a79c93ee (patch)
treef34d908d5b57531506595898b88c6ea73f7b5e9f
parent35cbd837655096f63f60a60db002e0960a71c8d7 (diff)
Add mroe autotests
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.cpp15
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.h3
2 files changed, 18 insertions, 0 deletions
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.cpp b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.cpp
index 1a08271..53ff4bc 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.cpp
@@ -19,6 +19,10 @@
#include "viewerpluginexternaleditdialogtest.h"
+#include "../configuredialog/viewerpluginexternaleditdialog.h"
+#include "../configuredialog/viewerpluginexternaleditwidget.h"
+
+#include <QDialogButtonBox>
#include <QTest>
ViewerPluginExternalEditDialogTest::ViewerPluginExternalEditDialogTest(QObject *parent)
@@ -32,4 +36,15 @@ ViewerPluginExternalEditDialogTest::~ViewerPluginExternalEditDialogTest()
}
+void ViewerPluginExternalEditDialogTest::shouldHaveDefaultValue()
+{
+ ViewerPluginExternalEditDialog dlg;
+
+ ViewerPluginExternalEditWidget *mEditWidget = dlg.findChild<ViewerPluginExternalEditWidget *>(QStringLiteral("editwidget"));
+ QVERIFY(mEditWidget);
+
+ QDialogButtonBox *buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonbox"));
+ QVERIFY(buttonBox);
+}
+
QTEST_MAIN(ViewerPluginExternalEditDialogTest)
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.h b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.h
index 9b3837b..016da54 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.h
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.h
@@ -28,6 +28,9 @@ class ViewerPluginExternalEditDialogTest : public QObject
public:
explicit ViewerPluginExternalEditDialogTest(QObject *parent = Q_NULLPTR);
~ViewerPluginExternalEditDialogTest();
+
+private Q_SLOTS:
+ void shouldHaveDefaultValue();
};
#endif // VIEWERPLUGINEXTERNALEDITDIALOGTEST_H