summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-04-24 20:51:51 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-04-24 20:51:51 (GMT)
commita32db865c13126df9dc676425f0f7b7a3fe5dea9 (patch)
tree814de84531cf48316b3609318e4722f1fdcb9537 /Swiften/Parser/PayloadParsers/UnitTest
parent522a3a1c66233792741eb47f75e009a2fe9fa3ad (diff)
downloadswift-contrib-a32db865c13126df9dc676425f0f7b7a3fe5dea9.zip
swift-contrib-a32db865c13126df9dc676425f0f7b7a3fe5dea9.tar.bz2
Set untyped fields to Text-Single.
XEP-0004 gives a default field type of Text-Single where none is specified.
Diffstat (limited to 'Swiften/Parser/PayloadParsers/UnitTest')
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp
index 6ec825b..7feada1 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp
@@ -77,7 +77,6 @@ class FormParserTest : public CppUnit::TestFixture {
"</field>"
"<field var=\"untyped\">"
"<value>foo</value>"
- "<value>baz</value>"
"</field>"
"</x>"));
@@ -114,8 +113,7 @@ class FormParserTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT_EQUAL(JID("baz@fum.org"), boost::dynamic_pointer_cast<JIDMultiFormField>(payload->getFields()[8])->getValue()[1]);
CPPUNIT_ASSERT_EQUAL(std::string("Tell all your friends about your new bot!"), payload->getFields()[8]->getDescription());
- CPPUNIT_ASSERT_EQUAL(std::string("foo"), boost::dynamic_pointer_cast<UntypedFormField>(payload->getFields()[9])->getValue()[0]);
- CPPUNIT_ASSERT_EQUAL(std::string("baz"), boost::dynamic_pointer_cast<UntypedFormField>(payload->getFields()[9])->getValue()[1]);
+ CPPUNIT_ASSERT_EQUAL(std::string("foo"), boost::dynamic_pointer_cast<TextSingleFormField>(payload->getFields()[9])->getValue());
}
};