aboutsummaryrefslogtreecommitdiff
path: root/tests/vcard.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-08-03 16:00:00 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2012-08-03 16:00:00 +0200
commit1268a64bdd1320639cad0d9c8331fb6fd682b30c (patch)
treecdac8502f77722401370cc3987a38dd6a8afd21b /tests/vcard.cpp
parentbecafc386f14967df87659cd408b5cee5835227d (diff)
downloadqxmpp-1268a64bdd1320639cad0d9c8331fb6fd682b30c.tar.gz
add stub for addresses
Diffstat (limited to 'tests/vcard.cpp')
-rw-r--r--tests/vcard.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/vcard.cpp b/tests/vcard.cpp
index b92b269b..ccc65199 100644
--- a/tests/vcard.cpp
+++ b/tests/vcard.cpp
@@ -26,6 +26,26 @@
#include "tests.h"
#include "vcard.h"
+void tst_QXmppVCardIq::testAddress_data()
+{
+ QTest::addColumn<QByteArray>("xml");
+ QTest::addColumn<int>("type");
+
+ QTest::newRow("none") << QByteArray("<ADR/>") << int(QXmppVCardAddress::None);
+ QTest::newRow("HOME") << QByteArray("<ADR><HOME/></ADR>") << int(QXmppVCardAddress::Home);
+}
+
+void tst_QXmppVCardIq::testAddress()
+{
+ QFETCH(QByteArray, xml);
+ QFETCH(int, type);
+
+ QXmppVCardAddress address;
+ parsePacket(address, xml);
+ QCOMPARE(int(address.type()), type);
+ serializePacket(address, xml);
+}
+
void tst_QXmppVCardIq::testEmail_data()
{
QTest::addColumn<QByteArray>("xml");