EWS fixes

This commit is contained in:
Maurus Decimus
2026-06-10 20:26:41 +02:00
parent f7371cc2ae
commit adbd0276a6
11 changed files with 631 additions and 280 deletions
+20 -8
View File
@@ -339,8 +339,11 @@ mod tests {
#[test]
fn get_item_calendar_shape_lists_calendar_fields() {
let body =
get_item_body(ItemShape::CalendarItem, &[ItemId::new("X", "")], ServerVersion::Exchange2010Sp2);
let body = get_item_body(
ItemShape::CalendarItem,
&[ItemId::new("X", "")],
ServerVersion::Exchange2010Sp2,
);
assert!(body.contains("calendar:Recurrence"));
assert!(body.contains("calendar:ModifiedOccurrences"));
assert!(body.contains("calendar:DeletedOccurrences"));
@@ -350,8 +353,11 @@ mod tests {
#[test]
fn get_item_contact_shape_requests_all_properties() {
let body =
get_item_body(ItemShape::Contact, &[ItemId::new("X", "")], ServerVersion::Exchange2013Sp1);
let body = get_item_body(
ItemShape::Contact,
&[ItemId::new("X", "")],
ServerVersion::Exchange2013Sp1,
);
assert!(body.contains("<t:BaseShape>AllProperties</t:BaseShape>"));
}
@@ -379,12 +385,18 @@ mod tests {
#[test]
fn calendar_timezone_fields_gated_on_exchange_2010() {
let modern =
get_item_body(ItemShape::CalendarItem, &[ItemId::new("X", "")], ServerVersion::Exchange2010);
let modern = get_item_body(
ItemShape::CalendarItem,
&[ItemId::new("X", "")],
ServerVersion::Exchange2010,
);
assert!(modern.contains("calendar:StartTimeZone"));
assert!(modern.contains("calendar:EndTimeZone"));
let legacy =
get_item_body(ItemShape::CalendarItem, &[ItemId::new("X", "")], ServerVersion::Exchange2007);
let legacy = get_item_body(
ItemShape::CalendarItem,
&[ItemId::new("X", "")],
ServerVersion::Exchange2007,
);
assert!(
!legacy.contains("TimeZone"),
"StartTimeZone/EndTimeZone are Exchange 2010 additions"