summaryrefslogtreecommitdiffstats
path: root/tests/lib.rs
diff options
context:
space:
mode:
authorMarkus Unterwaditzer <markus@unterwaditzer.net>2014-12-29 23:38:48 +0100
committerMarkus Unterwaditzer <markus@unterwaditzer.net>2014-12-29 23:38:48 +0100
commit133bc1de6120e16b344c6e1782d390acae0bc008 (patch)
tree23593b5e43aafff95a6b796e0d7cd5b11f57daab /tests/lib.rs
parent1e4fa6325350fe22978d5160a652d8d370d0751d (diff)
add basic support for groups
Diffstat (limited to 'tests/lib.rs')
-rw-r--r--tests/lib.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib.rs b/tests/lib.rs
index 89ed4e8..72496fe 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -90,3 +90,14 @@ fn test_escaping() {
assert_eq!(&item.name, s!("VCALENDAR"));
assert_eq!(item.single_prop("ORGANIZER").unwrap().get_raw_value(), s!("mailto:joe@joe.com"));
}
+
+#[test]
+fn test_property_groups() {
+ let item = parse_component(s!(
+ "BEGIN:VCARD\n\
+ foo.EMAIL;TYPE=INTERNET:foo@example.com\n\
+ foo.X-ACTUAL-TYPE:CUSTOM\n\
+ END:VCARD\n")).unwrap();
+ assert_eq!(item.single_prop("EMAIL").unwrap().get_prop_group(), &Some("foo".to_owned()));
+
+}