Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 332c34ef authored by Laurent Montel's avatar Laurent Montel 😁

improve unittest

parent 9832a5e6
......@@ -100,19 +100,19 @@ void GrantleePrintTest::shouldDisplayContactInfo_data()
QTest::newRow("title") << QString(QLatin1String("title")) << QString(QLatin1String("foo-title"));
QTest::newRow("nickName") << QString(QLatin1String("nickName")) << QString(QLatin1String("foo-nickname"));
QTest::newRow("familyName") << QString(QLatin1String("familyName")) << QString(QLatin1String("foo-familyname"));
QTest::newRow("role") << QString(QLatin1String("role")) << QString(QLatin1String("foo-role"));
QTest::newRow("suffix") << QString(QLatin1String("suffix")) << QString(QLatin1String("foo-suffix"));
QTest::newRow("prefix") << QString(QLatin1String("prefix")) << QString(QLatin1String("foo-prefix"));
QTest::newRow("department") << QString(QLatin1String("department")) << QString(QLatin1String("foo-department"));
#if 0
QString realName() const;
QString formattedName() const;
QString prefix() const;
QString givenName() const;
QString additionalName() const;
QString suffix() const;
QStringList emails() const;
QString webPage() const;
QString preferredEmail() const;
QString role() const;
QString birthday() const;
QString department() const;
QVariant addresses() const;
QVariant phones() const;
QString addressBookName() const;
......@@ -147,6 +147,10 @@ void GrantleePrintTest::shouldDisplayContactInfo()
address.setTitle(QLatin1String("foo-title"));
address.setNickName(QLatin1String("foo-nickname"));
address.setFamilyName(QLatin1String("foo-familyname"));
address.setRole(QLatin1String("foo-role"));
address.setSuffix(QLatin1String("foo-suffix"));
address.setPrefix(QLatin1String("foo-prefix"));
address.setDepartment(QLatin1String("foo-department"));
lst << address;
grantleePrint->setContent(QString::fromLatin1("{% if contacts %}{% for contact in contacts %}{% if contact.%1 %}{{ contact.%1 }}{% endif %}{% endfor %}{% endif %}").arg(variable));
......
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