summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/UnitTest')
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp
index 0d98dea..ebc8664 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp
@@ -96,6 +96,13 @@ class FormSerializerTest : public CppUnit::TestFixture {
field->setDescription("Tell all your friends about your new bot!");
form->addField(field);
+ std::vector<String> values2;
+ values2.push_back("foo");
+ values2.push_back("bar");
+ field = UntypedFormField::create(values2);
+ field->setName("fum");
+ form->addField(field);
+
CPPUNIT_ASSERT_EQUAL(String(
"<x type=\"form\" xmlns=\"jabber:x:data\">"
"<field type=\"hidden\" var=\"FORM_TYPE\">"
@@ -132,6 +139,10 @@ class FormSerializerTest : public CppUnit::TestFixture {
"<value>foo@bar.com</value>"
"<value>baz@fum.org</value>"
"</field>"
+ "<field var=\"fum\">"
+ "<value>foo</value>"
+ "<value>bar</value>"
+ "</field>"
"</x>"), testling.serialize(form));
}
};