Commit 1f715df4 authored by Laurent Montel's avatar Laurent Montel 😁

Add more autotest

parent be7823be
......@@ -42,4 +42,19 @@ void TemplateParserEmailAddressRequesterInterfaceWidgetTest::shouldHaveDefaultVa
QVERIFY(mTemplateParserEmailBase->text().isEmpty());
}
void TemplateParserEmailAddressRequesterInterfaceWidgetTest::shouldAssignValues()
{
TemplateParser::TemplateParserEmailAddressRequesterInterfaceWidget w;
TemplateParser::TemplateParserEmailAddressRequesterBase *mTemplateParserEmailBase =
w.findChild<TemplateParser::TemplateParserEmailAddressRequesterBase *>(QStringLiteral("templateparseremailbase"));
const QString value{QStringLiteral("foo")};
w.setText(value);
QCOMPARE(w.text(), value);
QCOMPARE(mTemplateParserEmailBase->text(), value);
w.clear();
QVERIFY(w.text().isEmpty());
QVERIFY(mTemplateParserEmailBase->text().isEmpty());
}
QTEST_MAIN(TemplateParserEmailAddressRequesterInterfaceWidgetTest)
......@@ -31,6 +31,7 @@ public:
private Q_SLOTS:
void shouldHaveDefaultValues();
void shouldAssignValues();
};
#endif // TEMPLATEPARSEREMAILADDRESSREQUESTERINTERFACEWIDGETTEST_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