diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-18 13:33:28 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-18 13:33:28 +0200 |
| commit | cf26a0767ffb97c3ed4931c2af84ebd38ed87fdf (patch) | |
| tree | e853f01a2bd465282b1656b91af0cd1e21161fc0 /tests | |
| parent | 4e1d91e55fcdfc87cfb92dfbcb3e741cd4a450fd (diff) | |
| download | qxmpp-cf26a0767ffb97c3ed4931c2af84ebd38ed87fdf.tar.gz | |
improve data form tests coverage
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/dataform.cpp | 15 | ||||
| -rw-r--r-- | tests/dataform.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/dataform.cpp b/tests/dataform.cpp index 769d8339..fd9d0c9d 100644 --- a/tests/dataform.cpp +++ b/tests/dataform.cpp @@ -52,6 +52,21 @@ void tst_QXmppDataForm::testSimple() serializePacket(form, xml); } +void tst_QXmppDataForm::testSubmit() +{ + const QByteArray xml( + "<x xmlns=\"jabber:x:data\" type=\"submit\">" + "<field type=\"text-single\" var=\"search_request\">" + "<value>verona</value>" + "</field>" + "</x>"); + + QXmppDataForm form; + parsePacket(form, xml); + QCOMPARE(form.isNull(), false); + serializePacket(form, xml); +} + void tst_QXmppDataForm::testMedia() { const QByteArray xml( diff --git a/tests/dataform.h b/tests/dataform.h index 1b294d8b..d5461237 100644 --- a/tests/dataform.h +++ b/tests/dataform.h @@ -30,6 +30,7 @@ class tst_QXmppDataForm : public QObject private slots: void testSimple(); + void testSubmit(); void testMedia(); }; |
