aboutsummaryrefslogtreecommitdiff
path: root/tests/all/tests.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-10-01 13:51:47 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2012-10-01 13:51:47 +0200
commitb7b7af761e4fe3f35bd8073e652a93b2559a4160 (patch)
treed930ab3931196ab92ab4a7b485bd4caa7d9586f0 /tests/all/tests.cpp
parent6d6e4423540f589f2127e69161814f887f5ab4c5 (diff)
downloadqxmpp-b7b7af761e4fe3f35bd8073e652a93b2559a4160.tar.gz
split QXmppDiscoveryIq tests
Diffstat (limited to 'tests/all/tests.cpp')
-rw-r--r--tests/all/tests.cpp63
1 files changed, 0 insertions, 63 deletions
diff --git a/tests/all/tests.cpp b/tests/all/tests.cpp
index 2731ea9c..f79be52b 100644
--- a/tests/all/tests.cpp
+++ b/tests/all/tests.cpp
@@ -22,7 +22,6 @@
*
*/
-#include "QXmppDiscoveryIq.h"
#include "QXmppEntityTimeIq.h"
#include "QXmppNonSASLAuth.h"
#include "QXmppSessionIq.h"
@@ -36,8 +35,6 @@ class TestPackets : public QObject
Q_OBJECT
private slots:
- void testDiscovery();
- void testDiscoveryWithForm();
void testNonSaslAuth();
void testSession();
void testStreamFeatures();
@@ -47,66 +44,6 @@ private slots:
void testEntityTimeResult();
};
-void TestPackets::testDiscovery()
-{
- 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::testDiscoveryWithForm()
-{
- const QByteArray xml(
- "<iq id=\"disco1\" to=\"juliet@capulet.lit/chamber\" from=\"benvolio@capulet.lit/230193\" type=\"result\">"
- "<query xmlns=\"http://jabber.org/protocol/disco#info\" node=\"http://psi-im.org#q07IKJEyjvHSyhy//CH0CxmKi8w=\">"
- "<identity xml:lang=\"en\" category=\"client\" name=\"Psi 0.11\" type=\"pc\"/>"
- "<identity xml:lang=\"el\" category=\"client\" name=\"Ψ 0.11\" 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\"/>"
- "<x xmlns=\"jabber:x:data\" type=\"result\">"
- "<field type=\"hidden\" var=\"FORM_TYPE\">"
- "<value>urn:xmpp:dataforms:softwareinfo</value>"
- "</field>"
- "<field type=\"text-multi\" var=\"ip_version\">"
- "<value>ipv4</value>"
- "<value>ipv6</value>"
- "</field>"
- "<field type=\"text-single\" var=\"os\">"
- "<value>Mac</value>"
- "</field>"
- "<field type=\"text-single\" var=\"os_version\">"
- "<value>10.5.1</value>"
- "</field>"
- "<field type=\"text-single\" var=\"software\">"
- "<value>Psi</value>"
- "</field>"
- "<field type=\"text-single\" var=\"software_version\">"
- "<value>0.11</value>"
- "</field>"
- "</x>"
- "</query>"
- "</iq>");
-
- QXmppDiscoveryIq disco;
- parsePacket(disco, xml);
- QCOMPARE(disco.verificationString(), QByteArray::fromBase64("q07IKJEyjvHSyhy//CH0CxmKi8w="));
- serializePacket(disco, xml);
-}
-
void TestPackets::testNonSaslAuth()
{
// Client Requests Authentication Fields from Server