diff --git a/crates/caldav/src/calendar/snapshots/rustical_caldav__calendar__tests__propfind-2.snap b/crates/caldav/src/calendar/snapshots/rustical_caldav__calendar__tests__propfind-2.snap
new file mode 100644
index 0000000..4ea5e6b
--- /dev/null
+++ b/crates/caldav/src/calendar/snapshots/rustical_caldav__calendar__tests__propfind-2.snap
@@ -0,0 +1,199 @@
+---
+source: crates/caldav/src/calendar/tests.rs
+expression: output
+---
+
+
+ /caldav/principal/user/calendar/
+
+
+ BEGIN:VCALENDAR
+PRODID:-//github.com/lennart-k/vzic-rs//RustiCal Calendar server//EN
+VERSION:2.0
+BEGIN:VTIMEZONE
+TZID:Europe/Berlin
+LAST-MODIFIED:20250723T190331Z
+X-LIC-LOCATION:Europe/Berlin
+X-PROLEPTIC-TZNAME:LMT
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+005328
+TZOFFSETTO:+0100
+DTSTART:18930401T000000
+END:STANDARD
+BEGIN:DAYLIGHT
+TZNAME:CEST
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+DTSTART:19160430T230000
+RDATE:19400401T020000
+RDATE:19430329T020000
+RDATE:19460414T020000
+RDATE:19470406T030000
+RDATE:19480418T020000
+RDATE:19490410T020000
+RDATE:19800406T020000
+END:DAYLIGHT
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+DTSTART:19161001T010000
+RDATE:19421102T030000
+RDATE:19431004T030000
+RDATE:19441002T030000
+RDATE:19451118T030000
+RDATE:19461007T030000
+END:STANDARD
+BEGIN:DAYLIGHT
+TZNAME:CEST
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+DTSTART:19170416T020000
+RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=3MO;UNTIL=19180415T010000Z
+END:DAYLIGHT
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+DTSTART:19170917T030000
+RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=3MO;UNTIL=19180916T010000Z
+END:STANDARD
+BEGIN:DAYLIGHT
+TZNAME:CEST
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+DTSTART:19440403T020000
+RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1MO;UNTIL=19450402T010000Z
+END:DAYLIGHT
+BEGIN:DAYLIGHT
+TZNAME:CEMT
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0300
+DTSTART:19450524T020000
+RDATE:19470511T030000
+END:DAYLIGHT
+BEGIN:DAYLIGHT
+TZNAME:CEST
+TZOFFSETFROM:+0300
+TZOFFSETTO:+0200
+DTSTART:19450924T030000
+RDATE:19470629T030000
+END:DAYLIGHT
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0100
+DTSTART:19460101T000000
+RDATE:19800101T000000
+END:STANDARD
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+DTSTART:19471005T030000
+RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU;UNTIL=19491002T010000Z
+END:STANDARD
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+DTSTART:19800928T030000
+RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU;UNTIL=19950924T010000Z
+END:STANDARD
+BEGIN:DAYLIGHT
+TZNAME:CEST
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+DTSTART:19810329T020000
+RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
+END:DAYLIGHT
+BEGIN:STANDARD
+TZNAME:CET
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+DTSTART:19961027T030000
+RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
+END:STANDARD
+END:VTIMEZONE
+END:VCALENDAR
+
+
+ https://www.iana.org/time-zones
+
+ Europe/Berlin
+ 0
+
+
+
+
+
+
+
+
+ i;ascii-casemap
+ i;octet
+
+ 10000000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -2621430101T000000Z
+ +2621421231T235959Z
+ github.com/lennart-k/rustical/ns/12
+ github.com/lennart-k/rustical/ns/12
+
+
+
+ b28b41e9-8801-4fc5-ae29-8efb5fadeb36
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+
+ Calendar
+
+ /caldav/principal/user/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /caldav/principal/user/
+
+
+ HTTP/1.1 200 OK
+
+
diff --git a/crates/caldav/src/calendar/snapshots/rustical_caldav__calendar__tests__propfind.snap b/crates/caldav/src/calendar/snapshots/rustical_caldav__calendar__tests__propfind.snap
new file mode 100644
index 0000000..1511f37
--- /dev/null
+++ b/crates/caldav/src/calendar/snapshots/rustical_caldav__calendar__tests__propfind.snap
@@ -0,0 +1,37 @@
+---
+source: crates/caldav/src/calendar/tests.rs
+expression: output
+---
+
+
+ /caldav/principal/user/calendar/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HTTP/1.1 200 OK
+
+
diff --git a/crates/caldav/src/calendar/test_files/propfind.outputs b/crates/caldav/src/calendar/test_files/propfind.outputs
deleted file mode 100644
index 9a28b63..0000000
--- a/crates/caldav/src/calendar/test_files/propfind.outputs
+++ /dev/null
@@ -1,230 +0,0 @@
-
-
- /caldav/principal/user/calendar/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HTTP/1.1 200 OK
-
-
-
-
-
-
- /caldav/principal/user/calendar/
-
-
- BEGIN:VCALENDAR
-PRODID:-//github.com/lennart-k/vzic-rs//RustiCal Calendar server//EN
-VERSION:2.0
-BEGIN:VTIMEZONE
-TZID:Europe/Berlin
-LAST-MODIFIED:20250723T190331Z
-X-LIC-LOCATION:Europe/Berlin
-X-PROLEPTIC-TZNAME:LMT
-BEGIN:STANDARD
-TZNAME:CET
-TZOFFSETFROM:+005328
-TZOFFSETTO:+0100
-DTSTART:18930401T000000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZNAME:CEST
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-DTSTART:19160430T230000
-RDATE:19400401T020000
-RDATE:19430329T020000
-RDATE:19460414T020000
-RDATE:19470406T030000
-RDATE:19480418T020000
-RDATE:19490410T020000
-RDATE:19800406T020000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZNAME:CET
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-DTSTART:19161001T010000
-RDATE:19421102T030000
-RDATE:19431004T030000
-RDATE:19441002T030000
-RDATE:19451118T030000
-RDATE:19461007T030000
-END:STANDARD
-BEGIN:DAYLIGHT
-TZNAME:CEST
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-DTSTART:19170416T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=3MO;UNTIL=19180415T010000Z
-END:DAYLIGHT
-BEGIN:STANDARD
-TZNAME:CET
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-DTSTART:19170917T030000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=3MO;UNTIL=19180916T010000Z
-END:STANDARD
-BEGIN:DAYLIGHT
-TZNAME:CEST
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-DTSTART:19440403T020000
-RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1MO;UNTIL=19450402T010000Z
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZNAME:CEMT
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0300
-DTSTART:19450524T020000
-RDATE:19470511T030000
-END:DAYLIGHT
-BEGIN:DAYLIGHT
-TZNAME:CEST
-TZOFFSETFROM:+0300
-TZOFFSETTO:+0200
-DTSTART:19450924T030000
-RDATE:19470629T030000
-END:DAYLIGHT
-BEGIN:STANDARD
-TZNAME:CET
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0100
-DTSTART:19460101T000000
-RDATE:19800101T000000
-END:STANDARD
-BEGIN:STANDARD
-TZNAME:CET
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-DTSTART:19471005T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU;UNTIL=19491002T010000Z
-END:STANDARD
-BEGIN:STANDARD
-TZNAME:CET
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-DTSTART:19800928T030000
-RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU;UNTIL=19950924T010000Z
-END:STANDARD
-BEGIN:DAYLIGHT
-TZNAME:CEST
-TZOFFSETFROM:+0100
-TZOFFSETTO:+0200
-DTSTART:19810329T020000
-RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
-END:DAYLIGHT
-BEGIN:STANDARD
-TZNAME:CET
-TZOFFSETFROM:+0200
-TZOFFSETTO:+0100
-DTSTART:19961027T030000
-RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
-END:STANDARD
-END:VTIMEZONE
-END:VCALENDAR
-
-
- https://www.iana.org/time-zones
-
- Europe/Berlin
- 0
-
-
-
-
-
-
-
-
- i;ascii-casemap
- i;octet
-
- 10000000
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -2621430101T000000Z
- +2621421231T235959Z
- github.com/lennart-k/rustical/ns/12
- github.com/lennart-k/rustical/ns/12
-
-
-
- b28b41e9-8801-4fc5-ae29-8efb5fadeb36
-
-
- 1
-
-
- 1
-
-
-
-
-
-
- Calendar
-
- /caldav/principal/user/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /caldav/principal/user/
-
-
- HTTP/1.1 200 OK
-
-
diff --git a/crates/caldav/src/calendar/tests.rs b/crates/caldav/src/calendar/tests.rs
index cb6c8c5..e6e1d87 100644
--- a/crates/caldav/src/calendar/tests.rs
+++ b/crates/caldav/src/calendar/tests.rs
@@ -14,14 +14,9 @@ async fn test_propfind() {
from_str(include_str!("./test_files/propfind.principals.json")).unwrap();
let resources: Vec =
from_str(include_str!("./test_files/propfind.resources.json")).unwrap();
- let outputs: Vec<_> = include_str!("./test_files/propfind.outputs")
- .trim()
- .split("\n\n")
- .collect();
for principal in principals {
- for ((request, resource), &expected_output) in requests.iter().zip(&resources).zip(&outputs)
- {
+ for (request, resource) in requests.iter().zip(&resources) {
let propfind = CalendarResource::parse_propfind(request).unwrap();
let response = resource
@@ -33,13 +28,12 @@ async fn test_propfind() {
&principal,
)
.unwrap();
- let expected_output = expected_output.trim();
let output = response
.serialize_to_string()
.unwrap()
.trim()
.replace("\r\n", "\n");
- similar_asserts::assert_eq!(expected_output, output);
+ insta::assert_snapshot!(output);
}
}
}
diff --git a/crates/caldav/src/principal/snapshots/rustical_caldav__principal__tests__propfind-3.snap b/crates/caldav/src/principal/snapshots/rustical_caldav__principal__tests__propfind-3.snap
index 1802b5e..235ed3d 100644
--- a/crates/caldav/src/principal/snapshots/rustical_caldav__principal__tests__propfind-3.snap
+++ b/crates/caldav/src/principal/snapshots/rustical_caldav__principal__tests__propfind-3.snap
@@ -3,51 +3,51 @@ source: crates/caldav/src/principal/tests.rs
expression: response.serialize_to_string().unwrap()
---
-
+
/caldav/principal/user/
-
- INDIVIDUAL
-
- /caldav/principal/user/
-
-
- /caldav/principal/user/
+
+ INDIVIDUAL
+
+ /caldav/principal/user/
+
+
+ /caldav/principal/user/
-
- /caldav/principal/group/
+
+ /caldav/principal/group/
-
+
-
-
-
-
-
+
+
+
+
+
-
- /caldav/principal/group/
- /caldav/principal/user/
-
-
-
-
+
+ /caldav/principal/group/
+ /caldav/principal/user/
+
+
+
+
- user
-
- /caldav/principal/user/
+ user
+
+ /caldav/principal/user/
-
+
-
- /caldav/principal/user/
+
+ /caldav/principal/user/
- HTTP/1.1 200 OK
+ HTTP/1.1 200 OK
diff --git a/crates/carddav/src/addressbook/snapshots/rustical_carddav__addressbook__tests__propfind-3.snap b/crates/carddav/src/addressbook/snapshots/rustical_carddav__addressbook__tests__propfind-3.snap
index d58d2c2..c75aa3b 100644
--- a/crates/carddav/src/addressbook/snapshots/rustical_carddav__addressbook__tests__propfind-3.snap
+++ b/crates/carddav/src/addressbook/snapshots/rustical_carddav__addressbook__tests__propfind-3.snap
@@ -3,57 +3,57 @@ source: crates/carddav/src/addressbook/tests.rs
expression: response.serialize_to_string().unwrap()
---
-
+
/carddav/principal/user/yeet/
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
- 10000000
- github.com/lennart-k/rustical/ns/0
- github.com/lennart-k/rustical/ns/0
-
-
-
- asdasd
-
-
- 1
-
-
- 1
-
-
-
-
-
+ 10000000
+ github.com/lennart-k/rustical/ns/0
+ github.com/lennart-k/rustical/ns/0
+
+
+
+ asdasd
+
+
+ 1
+
+
+ 1
+
+
+
+
+
-
- /carddav/principal/user/
+
+ /carddav/principal/user/
-
+
-
- /carddav/principal/user/
+
+ /carddav/principal/user/
- HTTP/1.1 200 OK
+ HTTP/1.1 200 OK
diff --git a/crates/carddav/src/principal/snapshots/rustical_carddav__principal__tests__propfind-3.snap b/crates/carddav/src/principal/snapshots/rustical_carddav__principal__tests__propfind-3.snap
index cde483a..7747a6f 100644
--- a/crates/carddav/src/principal/snapshots/rustical_carddav__principal__tests__propfind-3.snap
+++ b/crates/carddav/src/principal/snapshots/rustical_carddav__principal__tests__propfind-3.snap
@@ -3,43 +3,43 @@ source: crates/carddav/src/principal/tests.rs
expression: response.serialize_to_string().unwrap()
---
-
+
/carddav/principal/user/
-
-
- /carddav/principal/user/
+
+
+ /carddav/principal/user/
-
- /carddav/principal/group/
+
+ /carddav/principal/group/
-
+
-
-
- /carddav/principal/
+
+
+ /carddav/principal/
-
- /carddav/principal/group/
- /carddav/principal/user/
-
-
-
-
+
+ /carddav/principal/group/
+ /carddav/principal/user/
+
+
+
+
- user
-
- /carddav/principal/user/
+ user
+
+ /carddav/principal/user/
-
+
-
- /carddav/principal/user/
+
+ /carddav/principal/user/
- HTTP/1.1 200 OK
+ HTTP/1.1 200 OK
diff --git a/crates/dav/src/xml/multistatus.rs b/crates/dav/src/xml/multistatus.rs
index 67cd7c8..152e4af 100644
--- a/crates/dav/src/xml/multistatus.rs
+++ b/crates/dav/src/xml/multistatus.rs
@@ -42,13 +42,6 @@ pub enum PropstatWrapper {
// responsedescription?) >
#[derive(XmlSerialize, XmlRootTag, Debug)]
#[xml(ns = "crate::namespace::NS_DAV", root = "response")]
-#[xml(ns_prefix(
- crate::namespace::NS_DAV = "",
- crate::namespace::NS_CARDDAV = "CARD",
- crate::namespace::NS_CALDAV = "CAL",
- crate::namespace::NS_CALENDARSERVER = "CS",
- crate::namespace::NS_DAVPUSH = "PUSH"
-))]
pub struct ResponseElement {
pub href: String,
#[xml(serialize_with = "xml_serialize_optional_status")]
diff --git a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__propfind_body.snap b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__propfind_body.snap
index 4f01c77..86b6945 100644
--- a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__propfind_body.snap
+++ b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__propfind_body.snap
@@ -4,7 +4,7 @@ expression: body
---
-
+
/caldav/principal/user/calendar/
diff --git a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__proppatch_body.snap b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__proppatch_body.snap
index 0281bd2..a06674d 100644
--- a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__proppatch_body.snap
+++ b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__proppatch_body.snap
@@ -4,7 +4,7 @@ expression: body
---
-
+
/caldav/principal/user/calendar
diff --git a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_body.snap b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_body.snap
index c0c14ff..22a878d 100644
--- a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_body.snap
+++ b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_body.snap
@@ -4,7 +4,7 @@ expression: body
---
-
+
/caldav/
diff --git a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_depth_0.snap b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_depth_0.snap
index dfabdac..ff16872 100644
--- a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_depth_0.snap
+++ b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_depth_0.snap
@@ -4,7 +4,7 @@ expression: body
---
-
+
/caldav/principal/user/
diff --git a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_depth_1.snap b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_depth_1.snap
index dfabdac..ff16872 100644
--- a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_depth_1.snap
+++ b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__propfind_depth_1.snap
@@ -4,7 +4,7 @@ expression: body
---
-
+
/caldav/principal/user/
diff --git a/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__propfind_body.snap b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__propfind_body.snap
index 0d6ff30..5f6a7fc 100644
--- a/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__propfind_body.snap
+++ b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__propfind_body.snap
@@ -4,7 +4,7 @@ expression: body
---
-
+
/carddav/principal/user/contacts/
diff --git a/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__proppatch_body.snap b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__proppatch_body.snap
index 7292103..eaefeba 100644
--- a/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__proppatch_body.snap
+++ b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__proppatch_body.snap
@@ -4,7 +4,7 @@ expression: body
---
-
+
/carddav/principal/user/contacts
diff --git a/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__carddav_root-3.snap b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__carddav_root-3.snap
index 1e52bec..94daf7e 100644
--- a/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__carddav_root-3.snap
+++ b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__carddav_root-3.snap
@@ -4,7 +4,7 @@ expression: body
---
-
+
/carddav/