summaryrefslogtreecommitdiff
path: root/tests/kolabobjecttest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2014-08-27 08:26:26 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2014-08-27 08:26:26 (GMT)
commit1173670e0716cdcb2d4fde6f80fc00f1a5d4ed38 (patch)
tree02121f16044134051a5303cecfe5187692b85fb6 /tests/kolabobjecttest.cpp
parent2148b17a086e18e0b9d77b22d8c9a2683f6e3b73 (diff)
downloadlibkolab-1173670e0716cdcb2d4fde6f80fc00f1a5d4ed38.tar.gz
Added tag support.
Thanks to Kevin Krammer for the initial version of the patch.
Diffstat (limited to 'tests/kolabobjecttest.cpp')
-rw-r--r--tests/kolabobjecttest.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/kolabobjecttest.cpp b/tests/kolabobjecttest.cpp
index a90b39d..f57ce1d 100644
--- a/tests/kolabobjecttest.cpp
+++ b/tests/kolabobjecttest.cpp
@@ -80,6 +80,34 @@ void KolabObjectTest::dontCrashWithEmptyIncidence()
QCOMPARE(Kolab::ErrorHandler::instance().error(), Kolab::ErrorHandler::Critical);
}
+void KolabObjectTest::parseRelationMembers()
+{
+ {
+ // QString memberString("imap:///user/jan.aachen%40lhm.klab.cc/INBOX/20?message-id=%3Cf06aa3345a25005380b47547ad161d36%40lhm.klab.cc%3E&date=Tue%2C+12+Aug+2014+20%3A42%3A59+%2B0200&subject=Re%3A+test");
+ QString memberString("imap:///user/jan.aachen%40lhm.klab.cc/INBOX/20?message-id=%3Cf06aa3345a25005380b47547ad161d36%40lhm.klab.cc%3E&date=Tue%2C+12+Aug+2014+20%3A42%3A59+%2B0200&subject=Re%3A+test");
+ Kolab::RelationMember member = Kolab::parseMemberUrl(memberString);
+
+
+ const QString result = Kolab::generateMemberUrl(member);
+ qDebug() << result;
+ }
+
+ {
+
+ Kolab::RelationMember member;
+ member.uid = 20;
+ member.mailbox = QList<QByteArray>() << "INBOX";
+ member.user = "john.doe@example.org";
+ member.messageId = "messageid";
+ member.date = "date";
+ member.subject = "subject";
+ QString url = Kolab::generateMemberUrl(member);
+ qDebug() << url;
+ Kolab::RelationMember result = Kolab::parseMemberUrl(url);
+ QCOMPARE(result.uid, member.uid);
+ QCOMPARE(result.mailbox, member.mailbox);
+ }
+}