diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-09-16 19:56:28 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-09-16 19:57:14 (GMT) |
commit | 26d2766be47b8c5643dd7e922a0d16576e810dae (patch) | |
tree | d7a57ecd95f44ba5e1fb35c280ee89f83f5f9804 /Swiften/Serializer/PayloadSerializers/UnitTest | |
parent | e6305de74271ed4dd526888a217388f825d3b8fb (diff) | |
download | swift-26d2766be47b8c5643dd7e922a0d16576e810dae.zip swift-26d2766be47b8c5643dd7e922a0d16576e810dae.tar.bz2 |
Don't assert on untyped form fields.
Resolves: #567
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/UnitTest')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp | 11 |
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)); } }; |