diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-05-14 10:26:30 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-05-14 10:26:30 +0200 |
| commit | 79e2192b07694be32367feb8fad4d27e75cc87e7 (patch) | |
| tree | 34395ea611cc8647bc3c3b831b5d8bb18d6596ac /tests/tests.cpp | |
| parent | 6bf8bddcef99f4ebe9637bf20546562c81f70eb2 (diff) | |
| download | qxmpp-79e2192b07694be32367feb8fad4d27e75cc87e7.tar.gz | |
test QXmppDiscoveryIq
Diffstat (limited to 'tests/tests.cpp')
| -rw-r--r-- | tests/tests.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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( + "<iq id=\"disco1\" from=\"benvolio@capulet.lit/230193\" type=\"result\">" + "<query xmlns=\"http://jabber.org/protocol/disco#info\">" + "<identity category=\"client\" name=\"Exodus 0.9.1\" type=\"pc\"/>" + "<feature var=\"http://jabber.org/protocol/caps\"/>" + "<feature var=\"http://jabber.org/protocol/disco#info\"/>" + "<feature var=\"http://jabber.org/protocol/disco#items\"/>" + "<feature var=\"http://jabber.org/protocol/muc\"/>" + "</query>" + "</iq>"); + + QXmppDiscoveryIq disco; + parsePacket(disco, xml); + QCOMPARE(disco.verificationString(), QByteArray::fromBase64("QgayPKawpkPSDYmwT/WM94uAlu0=")); + serializePacket(disco, xml); +} + void TestPackets::testMessage() { const QByteArray xml( |
