Commit 9259ce4f authored by Laurent Montel's avatar Laurent Montel 😁

Test default values

parent 20fe6e04
......@@ -18,6 +18,7 @@
*/
#include "mailtrackingwarningwidgettest.h"
#include "widgets/mailtrackingwarningwidget.h"
#include <QTest>
QTEST_MAIN(MailTrackingWarningWidgetTest)
......@@ -27,3 +28,12 @@ MailTrackingWarningWidgetTest::MailTrackingWarningWidgetTest(QObject *parent)
{
}
void MailTrackingWarningWidgetTest::shouldHaveDefaultValues()
{
MessageViewer::MailTrackingWarningWidget w;
QVERIFY(!w.isVisible());
QVERIFY(!w.isCloseButtonVisible());
QVERIFY(w.wordWrap());
QVERIFY(!w.text().isEmpty());
}
......@@ -28,7 +28,8 @@ class MailTrackingWarningWidgetTest : public QObject
public:
explicit MailTrackingWarningWidgetTest(QObject *parent = nullptr);
~MailTrackingWarningWidgetTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
};
#endif // MAILTRACKINGWARNINGWIDGETTEST_H
......@@ -30,7 +30,6 @@ MailTrackingWarningWidget::MailTrackingWarningWidget(QWidget *parent)
setMessageType(Warning);
setWordWrap(true);
//Add info here.
setText(i18n("Some Mail Tracker was found and was blocked.<a href=\"mailtrackingdetails\">(Details...)"));
connect(this, &MailTrackingWarningWidget::linkActivated, this,
&MailTrackingWarningWidget::slotShowDetails);
......
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