diff options
| author | Linus Jahn <lnj@kaidan.im> | 2020-10-30 15:54:24 +0100 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2020-10-31 20:05:32 +0100 |
| commit | ca76b24e1af920cbc2c07b950dd1dad81ff98dc5 (patch) | |
| tree | 33a7a34ce390d8c928e3a69ebdff315309518071 /tests | |
| parent | 86645242f919468a353cbe3037a67496cd7a53aa (diff) | |
| download | qxmpp-ca76b24e1af920cbc2c07b950dd1dad81ff98dc5.tar.gz | |
SaslClientScram: Refactor to simplify adding new algorithms
Adding new algorithms only needs a new name/algorithm entry now.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/qxmppsasl/tst_qxmppsasl.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/qxmppsasl/tst_qxmppsasl.cpp b/tests/qxmppsasl/tst_qxmppsasl.cpp index 5121ea5a..cb216ba7 100644 --- a/tests/qxmppsasl/tst_qxmppsasl.cpp +++ b/tests/qxmppsasl/tst_qxmppsasl.cpp @@ -190,14 +190,18 @@ void tst_QXmppSasl::testSuccess() void tst_QXmppSasl::testClientAvailableMechanisms() { - QCOMPARE(QXmppSaslClient::availableMechanisms(), QStringList() << "SCRAM-SHA-256" - << "SCRAM-SHA-1" - << "DIGEST-MD5" - << "PLAIN" - << "ANONYMOUS" - << "X-FACEBOOK-PLATFORM" - << "X-MESSENGER-OAUTH2" - << "X-OAUTH2"); + const QStringList expectedMechanisms = { + "SCRAM-SHA-256", + "SCRAM-SHA-1", + "DIGEST-MD5", + "PLAIN", + "ANONYMOUS", + "X-FACEBOOK-PLATFORM", + "X-MESSENGER-OAUTH2", + "X-OAUTH2" + }; + + QCOMPARE(QXmppSaslClient::availableMechanisms(), expectedMechanisms); } void tst_QXmppSasl::testClientBadMechanism() |
