From 94f4a045d5f7994fbe000f41a3fd2f6bf4431511 Mon Sep 17 00:00:00 2001 From: Melvin Keskin Date: Thu, 7 Apr 2022 18:54:54 +0200 Subject: PubSubManager: Add requestPepFeatures() --- tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests') diff --git a/tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp b/tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp index 11c41dd2..8eadc895 100644 --- a/tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp +++ b/tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp @@ -71,6 +71,7 @@ class tst_QXmppPubSubManager : public QObject private: Q_SLOT void testDiscoFeatures(); Q_SLOT void testRequestFeatures(); + Q_SLOT void testRequestPepFeatures(); Q_SLOT void testFetchNodes(); Q_SLOT void testFetchPepNodes(); Q_SLOT void testCreateNodes_data(); @@ -218,6 +219,25 @@ void tst_QXmppPubSubManager::testRequestFeatures() QCOMPARE(features, (QVector { ns_pubsub, ns_pubsub_auto_create })); } +void tst_QXmppPubSubManager::testRequestPepFeatures() +{ + auto [test, psManager] = Client(); + + auto future = psManager->requestPepFeatures(); + test.expect(QStringLiteral("" + "" + "")); + test.inject(QStringLiteral("" + "" + "" + "" + "" + "")); + + auto features = expectFutureVariant>(future); + QCOMPARE(features, (QVector { ns_pubsub, ns_pubsub_auto_create })); +} + void tst_QXmppPubSubManager::testFetchNodes() { auto [test, psManager] = Client(); -- cgit v1.2.3