diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-03-16 18:54:37 +0100 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-03-16 20:02:44 +0100 |
| commit | a88dbd554464af76fb8f017e8d6d019224d9bd66 (patch) | |
| tree | d98faab171071eb8fc74835f689f9ce9d03dfb12 /tests | |
| parent | 0383266d61577d0829f48d284e417b1ffb372812 (diff) | |
| download | qxmpp-a88dbd554464af76fb8f017e8d6d019224d9bd66.tar.gz | |
tests: MixIq: Add test case for invalid action type
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/qxmppmixiq/tst_qxmppmixiq.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/qxmppmixiq/tst_qxmppmixiq.cpp b/tests/qxmppmixiq/tst_qxmppmixiq.cpp index fd1bc9c3..70c20dcb 100644 --- a/tests/qxmppmixiq/tst_qxmppmixiq.cpp +++ b/tests/qxmppmixiq/tst_qxmppmixiq.cpp @@ -19,6 +19,7 @@ private slots: void testBase(); void testDefaults(); void testSetters(); + void testInvalidActionType(); void testIsMixIq(); }; @@ -348,6 +349,18 @@ void tst_QXmppMixIq::testSetters() QCOMPARE(iq.nick(), QString("SMUDO")); } +void tst_QXmppMixIq::testInvalidActionType() +{ + const QByteArray xml = + "<iq id='E6E10350' to='hag66@example.org'" + " from='hag66@example.org/123' type='set'>" + "<set-on-fire xmlns='urn:xmpp:mix:core:1' channel='coven'/>" + "</iq>"; + QXmppMixIq iq; + parsePacket(iq, xml); + QCOMPARE(iq.actionType(), QXmppMixIq::None); +} + void tst_QXmppMixIq::testIsMixIq() { const QByteArray trueXml( |
