aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-08-29 13:29:49 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-08-29 13:29:49 +0000
commit1bcb401ba2033422fdeb72613075c919da64a33c (patch)
tree86c124fd5eefa08c58cb5bbb0aaa3dcf52d2f466 /tests/tests.cpp
parent3262770864dbec33184448202a9045f577636d5e (diff)
downloadqxmpp-1bcb401ba2033422fdeb72613075c919da64a33c.tar.gz
fix stream features test
Diffstat (limited to 'tests/tests.cpp')
-rw-r--r--tests/tests.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/tests.cpp b/tests/tests.cpp
index e5d43e1c..9632fd8d 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -412,30 +412,30 @@ void TestPackets::testStreamFeatures()
const QByteArray xml("<stream:features/>");
QXmppStreamFeatures features;
parsePacket(features, xml);
- QCOMPARE(features.isBindAvailable(), false);
- QCOMPARE(features.isSessionAvailable(), false);
- QCOMPARE(features.isNonSaslAuthAvailable(), false);
+ QCOMPARE(features.bindMode(), QXmppStreamFeatures::Disabled);
+ QCOMPARE(features.sessionMode(), QXmppStreamFeatures::Disabled);
+ QCOMPARE(features.nonSaslAuthMode(), QXmppStreamFeatures::Disabled);
+ QCOMPARE(features.tlsMode(), QXmppStreamFeatures::Disabled);
QCOMPARE(features.authMechanisms(), QList<QXmppConfiguration::SASLAuthMechanism>());
QCOMPARE(features.compressionMethods(), QList<QXmppConfiguration::CompressionMethod>());
- QCOMPARE(features.securityMode(), QXmppConfiguration::TLSDisabled);
serializePacket(features, xml);
const QByteArray xml2("<stream:features>"
"<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\"/>"
"<session xmlns=\"urn:ietf:params:xml:ns:xmpp-session\"/>"
- "<compression xmlns=\"http://jabber.org/features/compress\"><method>zlib</method></compression>"
- "<mechanisms xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"><mechanism>PLAIN</mechanism></mechanisms>"
"<auth xmlns=\"http://jabber.org/features/iq-auth\"/>"
"<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>"
+ "<compression xmlns=\"http://jabber.org/features/compress\"><method>zlib</method></compression>"
+ "<mechanisms xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"><mechanism>PLAIN</mechanism></mechanisms>"
"</stream:features>");
QXmppStreamFeatures features2;
parsePacket(features2, xml2);
- QCOMPARE(features2.isBindAvailable(), true);
- QCOMPARE(features2.isSessionAvailable(), true);
- QCOMPARE(features2.isNonSaslAuthAvailable(), true);
+ QCOMPARE(features2.bindMode(), QXmppStreamFeatures::Enabled);
+ QCOMPARE(features2.sessionMode(), QXmppStreamFeatures::Enabled);
+ QCOMPARE(features2.nonSaslAuthMode(), QXmppStreamFeatures::Enabled);
+ QCOMPARE(features2.tlsMode(), QXmppStreamFeatures::Enabled);
QCOMPARE(features2.authMechanisms(), QList<QXmppConfiguration::SASLAuthMechanism>() << QXmppConfiguration::SASLPlain);
QCOMPARE(features2.compressionMethods(), QList<QXmppConfiguration::CompressionMethod>() << QXmppConfiguration::ZlibCompression);
- QCOMPARE(features2.securityMode(), QXmppConfiguration::TLSEnabled);
serializePacket(features2, xml2);
}