summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/SASL/UnitTest')
-rw-r--r--Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp b/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp
index 0c1543a..1b2c121 100644
--- a/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp
+++ b/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp
@@ -21,7 +21,16 @@ class DIGESTMD5PropertiesTest : public CppUnit::TestFixture {
void testParse() {
DIGESTMD5Properties properties = DIGESTMD5Properties::parse(ByteArray(
"realm=\"myrealm1\",realm=\"myrealm2\",nonce=\"mynonce\","
- "algorithm=\"md5-sess\""));
+ "algorithm=md5-sess,charset=utf-8"));
+
+ CPPUNIT_ASSERT(properties.getValue("realm"));
+ CPPUNIT_ASSERT_EQUAL(String("myrealm1"), *properties.getValue("realm"));
+ CPPUNIT_ASSERT(properties.getValue("nonce"));
+ CPPUNIT_ASSERT_EQUAL(String("mynonce"), *properties.getValue("nonce"));
+ CPPUNIT_ASSERT(properties.getValue("algorithm"));
+ CPPUNIT_ASSERT_EQUAL(String("md5-sess"), *properties.getValue("algorithm"));
+ CPPUNIT_ASSERT(properties.getValue("charset"));
+ CPPUNIT_ASSERT_EQUAL(String("utf-8"), *properties.getValue("charset"));
}
void testSerialize() {