From 52f870633c2cab8a4aeeec74792774931139b8b5 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sat, 25 May 2024 19:30:59 +0200 Subject: add a new aero-ical module --- aerogramme/tests/behavior.rs | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'aerogramme/tests') diff --git a/aerogramme/tests/behavior.rs b/aerogramme/tests/behavior.rs index b6c1c6e..0e6dab6 100644 --- a/aerogramme/tests/behavior.rs +++ b/aerogramme/tests/behavior.rs @@ -684,6 +684,7 @@ fn rfc4791_webdav_caldav() { ) .send()?; //@FIXME not yet supported. returns DAV: 1 ; expects DAV: 1 calendar-access + // Not used by any client I know, so not implementing it now. // --- REPORT calendar-query --- //@FIXME missing support for calendar-data... @@ -729,7 +730,7 @@ fn rfc4791_webdav_caldav() { }); // 8.2.1.2. Synchronize by Time Range (here: July 2006) - let cal_query = r#" + let cal_query = r#" @@ -754,6 +755,43 @@ fn rfc4791_webdav_caldav() { assert_eq!(multistatus.responses.len(), 1); check_cal(&multistatus, ("/alice/calendar/Personal/rfc2.ics", Some(obj2_etag.to_str().expect("etag header convertible to str")), None)); + // 7.8.5. Example: Retrieval of To-Dos by Alarm Time Range + let cal_query = r#" + + + + + + + + + + + + + + + "#; + let resp = http + .request( + reqwest::Method::from_bytes(b"REPORT")?, + "http://localhost:8087/alice/calendar/Personal/", + ) + .body(cal_query) + .send()?; + assert_eq!(resp.status(), 207); + let multistatus = dav_deserialize::>(&resp.text()?); + //assert_eq!(multistatus.responses.len(), 1); + + // 7.8.6. Example: Retrieval of Event by UID + // @TODO + + // 7.8.7. Example: Retrieval of Events by PARTSTAT + // @TODO + + // 7.8.9. Example: Retrieval of All Pending To-Dos + // @TODO + // --- REPORT calendar-multiget --- let cal_query = r#" -- cgit v1.2.3