aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-28 07:54:46 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-28 07:54:46 (GMT)
commita649e302584aa38ebc77bb2abf1e0e9ab9ad6399 (patch)
tree23424c2e0e1ab19b6820f7866c93159682bb9497
parent9e537d552dcbff830154606dbbfcab2932368d2f (diff)
We need more autotests here too
-rw-r--r--autotests/birthdaytest.cpp19
-rw-r--r--autotests/birthdaytest.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/autotests/birthdaytest.cpp b/autotests/birthdaytest.cpp
index d1db95c..4124ad1 100644
--- a/autotests/birthdaytest.cpp
+++ b/autotests/birthdaytest.cpp
@@ -35,6 +35,25 @@ BirthDayTest::~BirthDayTest()
}
+void BirthDayTest::shouldParseBirthDay()
+{
+ QByteArray vcarddata("BEGIN:VCARD\r\n"
+ "VERSION:4.0\r\n"
+ "BDAY:19760505T120505\r\n"
+ "EMAIL:foo@kde.org\r\n"
+ "EMAIL:bla@kde.org\r\n"
+ "N:;;;;\r\n"
+ "UID:testuid\r\n"
+ "END:VCARD\r\n\r\n");
+
+ KContacts::VCardTool vcard;
+ const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata);
+ QCOMPARE(lst.count(), 1);
+ //QCOMPARE(lst.at(0).clientPidMapList().count(), 1);
+ //QCOMPARE(lst.at(0).clientPidMapList().at(0).clientPidMap(), QStringLiteral("boo"));
+
+}
+
void BirthDayTest::shouldExportVcard4()
{
KContacts::AddresseeList lst;
diff --git a/autotests/birthdaytest.h b/autotests/birthdaytest.h
index ae5a0da..11041ce 100644
--- a/autotests/birthdaytest.h
+++ b/autotests/birthdaytest.h
@@ -35,6 +35,7 @@ private Q_SLOTS:
void shouldExportVcard4WithoutTime();
void shouldExportVcard3();
void shouldExportVcard3WithoutTime();
+ void shouldParseBirthDay();
};
#endif // BIRTHDAYTEST_H