Commit 629f191d authored by Laurent Montel's avatar Laurent Montel 😁

improve autotest

parent 4b41167e
......@@ -104,6 +104,27 @@ void TitleTest::shouldEqualTitle()
QVERIFY(title == result);
}
void TitleTest::shouldParseTwoTitles()
{
QByteArray vcarddata("BEGIN:VCARD\n"
"VERSION:3.0\n"
"N:LastName;FirstName;;;\n"
"UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n"
"Title:boo\n"
"Title:bla\n"
"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);
QCOMPARE(lst.at(0).extraTitleList().count(), 2);
QCOMPARE(lst.at(0).title(), QStringLiteral("boo"));
QCOMPARE(lst.at(0).extraTitleList().at(0).title(), QStringLiteral("boo"));
QCOMPARE(lst.at(0).extraTitleList().at(1).title(), QStringLiteral("bla"));
}
void TitleTest::shouldParseTitle()
{
......
......@@ -35,6 +35,7 @@ private Q_SLOTS:
void shouldAssignExternal();
void shouldSerialized();
void shouldEqualTitle();
void shouldParseTwoTitles();
void shouldParseTitle();
void shouldParseWithoutTitle();
void shouldCreateVCard();
......
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