From 79e2192b07694be32367feb8fad4d27e75cc87e7 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 14 May 2012 10:26:30 +0200 Subject: test QXmppDiscoveryIq --- tests/tests.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/tests.cpp') diff --git a/tests/tests.cpp b/tests/tests.cpp index c4e22cf8..5aea4132 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -34,6 +34,7 @@ #include "QXmppBindIq.h" #include "QXmppClient.h" #include "QXmppCodec.h" +#include "QXmppDiscoveryIq.h" #include "QXmppJingleIq.h" #include "QXmppMessage.h" #include "QXmppNonSASLAuth.h" @@ -333,6 +334,25 @@ void TestPackets::testBindResult() serializePacket(bind, xml); } +void TestPackets::testDiscoveryIq() +{ + const QByteArray xml( + "" + "" + "" + "" + "" + "" + "" + "" + ""); + + QXmppDiscoveryIq disco; + parsePacket(disco, xml); + QCOMPARE(disco.verificationString(), QByteArray::fromBase64("QgayPKawpkPSDYmwT/WM94uAlu0=")); + serializePacket(disco, xml); +} + void TestPackets::testMessage() { const QByteArray xml( -- cgit v1.2.3