Commit 80286a1e authored by Laurent Montel's avatar Laurent Montel 😁

improve autotest

parent 0e7d1702
......@@ -240,7 +240,23 @@ void PhoneNumberTest::shouldExportVCard4()
void PhoneNumberTest::shouldParseVcard3()
{
QByteArray vcarddata("BEGIN:VCARD\n"
"VERSION:3.0\n"
"N:LastName;FirstName;;;\n"
"TEL;VALUE=uri;PREF=1;TYPE=\"voice,home\":tel:+44-555-555-5555;ext=5555\r\n"
"TEL;VALUE=uri;TYPE=\"voice,cell,text\":tel:+44-555-555-6666\r\n"
"TEL;VALUE=uri;TYPE=\"voice,work\":tel:+44-555-555-7777\r\n"
"UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n"
"LANG:fr"
"REV:2015-03-14T09:24:45+00:00\n"
"FN:FirstName LastName\n"
"END:VCARD\n");
KContacts::VCardTool vcard;
const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata);
QCOMPARE(lst.count(), 1);
KContacts::Addressee addr = lst.at(0);
QCOMPARE(addr.phoneNumbers().count(), 3);
}
void PhoneNumberTest::shouldParseVcard4()
......@@ -259,4 +275,7 @@ void PhoneNumberTest::shouldParseVcard4()
KContacts::VCardTool vcard;
const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata);
QCOMPARE(lst.count(), 1);
KContacts::Addressee addr = lst.at(0);
QCOMPARE(addr.phoneNumbers().count(), 3);
}
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