aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-07-18 13:18:17 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2012-07-18 13:18:17 +0200
commit30cb222f96d95d62ac75fdf454f8b4a20001d3d5 (patch)
treed681201725ea01de99c82b296bd680a7b4cbfd1b /tests/tests.cpp
parent8829e34be6fed89fe2b80410f7f722a2b67347bd (diff)
downloadqxmpp-30cb222f96d95d62ac75fdf454f8b4a20001d3d5.tar.gz
don't write null form values
Diffstat (limited to 'tests/tests.cpp')
-rw-r--r--tests/tests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/tests.cpp b/tests/tests.cpp
index 8d74938a..53cd1f3e 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -945,10 +945,9 @@ void TestDataForm::testSimple()
{
const QByteArray xml(
"<x xmlns=\"jabber:x:data\" type=\"form\">"
- "<title>Search</title>"
+ "<title>Joggle Search</title>"
"<instructions>Fill out this form to search for information!</instructions>"
"<field type=\"text-single\" var=\"search_request\">"
- "<value/>"
"<required/>"
"</field>"
"</x>");
@@ -957,7 +956,8 @@ void TestDataForm::testSimple()
parsePacket(form, xml);
QCOMPARE(form.isNull(), false);
- QCOMPARE(form.instructions(), QString("Fill out this form to search for information!"));
+ QCOMPARE(form.title(), QLatin1String("Joggle Search"));
+ QCOMPARE(form.instructions(), QLatin1String("Fill out this form to search for information!"));
QCOMPARE(form.fields().size(), 1);
QCOMPARE(form.fields().at(0).type(), QXmppDataForm::Field::TextSingleField);
QCOMPARE(form.fields().at(0).isRequired(), true);