aboutsummaryrefslogtreecommitdiff
path: root/tests/qxmppstreamfeatures/tst_qxmppstreamfeatures.cpp
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2015-10-24 00:19:25 +0200
committerLinus Jahn <lnj@kaidan.im>2018-10-29 21:41:31 +0100
commit5559ed29681d031f36e7a7d011e3ec4bec3635f5 (patch)
treeb639a8c68f1d1255b5528bde34412ffc64a34fb6 /tests/qxmppstreamfeatures/tst_qxmppstreamfeatures.cpp
parent3e2ca3c04a5a681fa97ebabf6f31b301ec9753a0 (diff)
downloadqxmpp-5559ed29681d031f36e7a7d011e3ec4bec3635f5.tar.gz
Implement XEP-0352: Client State Indication
This commit is based on a pull request by fbeutel (GitHub) (see #87) and was rebased and slightly modified by me.
Diffstat (limited to 'tests/qxmppstreamfeatures/tst_qxmppstreamfeatures.cpp')
-rw-r--r--tests/qxmppstreamfeatures/tst_qxmppstreamfeatures.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/qxmppstreamfeatures/tst_qxmppstreamfeatures.cpp b/tests/qxmppstreamfeatures/tst_qxmppstreamfeatures.cpp
index f5f0ea0f..16b17408 100644
--- a/tests/qxmppstreamfeatures/tst_qxmppstreamfeatures.cpp
+++ b/tests/qxmppstreamfeatures/tst_qxmppstreamfeatures.cpp
@@ -43,6 +43,7 @@ void tst_QXmppStreamFeatures::testEmpty()
QCOMPARE(features.sessionMode(), QXmppStreamFeatures::Disabled);
QCOMPARE(features.nonSaslAuthMode(), QXmppStreamFeatures::Disabled);
QCOMPARE(features.tlsMode(), QXmppStreamFeatures::Disabled);
+ QCOMPARE(features.clientStateIndicationMode(), QXmppStreamFeatures::Disabled);
QCOMPARE(features.authMechanisms(), QStringList());
QCOMPARE(features.compressionMethods(), QStringList());
serializePacket(features, xml);
@@ -55,6 +56,7 @@ void tst_QXmppStreamFeatures::testFull()
"<session xmlns=\"urn:ietf:params:xml:ns:xmpp-session\"/>"
"<auth xmlns=\"http://jabber.org/features/iq-auth\"/>"
"<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>"
+ "<csi xmlns=\"urn:xmpp:csi:0\"/>"
"<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>");
@@ -65,6 +67,7 @@ void tst_QXmppStreamFeatures::testFull()
QCOMPARE(features.sessionMode(), QXmppStreamFeatures::Enabled);
QCOMPARE(features.nonSaslAuthMode(), QXmppStreamFeatures::Enabled);
QCOMPARE(features.tlsMode(), QXmppStreamFeatures::Enabled);
+ QCOMPARE(features.clientStateIndicationMode(), QXmppStreamFeatures::Enabled);
QCOMPARE(features.authMechanisms(), QStringList() << "PLAIN");
QCOMPARE(features.compressionMethods(), QStringList() << "zlib");
serializePacket(features, xml);