summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-12-28 18:38:24 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-12-28 18:38:24 +0100
commit65b0a0587fffbc0edc93177b616b62700fbac554 (patch)
tree7c26e18df9345ab8464962925bf4e946ab2f02a9
parent810500bcbd9084f3d85b4341114293aa25f18dff (diff)
Add simple test for parsingfeature/libical
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--tests/calendar.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/calendar.rs b/tests/calendar.rs
index badcb15..63e91ab 100644
--- a/tests/calendar.rs
+++ b/tests/calendar.rs
@@ -1,5 +1,5 @@
use chrono::prelude::*;
-use icalendar::{Calendar, Class, Component, Event, EventStatus, Todo};
+use icalendar::{Calendar, Class, Component, Event, EventStatus, Todo, parser};
use pretty_assertions::assert_eq;
const EXPECTED_CAL_CONTENT: &str = "\
@@ -61,3 +61,10 @@ fn test_calendar_to_string() {
calendar.push(todo);
assert_eq!(calendar.to_string(), EXPECTED_CAL_CONTENT);
}
+
+#[test]
+fn test_string_to_calendar() {
+ let cal = parser::parse(EXPECTED_CAL_CONTENT);
+ assert!(cal.is_ok());
+}
+