aboutsummaryrefslogtreecommitdiff
path: root/src/dav/encoder.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-03-01 16:37:27 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-03-01 16:37:27 +0100
commit77e2f8abbb2d70413ba571baf405f10572299fd9 (patch)
tree2bd793249e436510fcaee9285c98aa38779cf348 /src/dav/encoder.rs
parent0cadcbea98357d4b3a3b12fbba87da975677deca (diff)
downloadaerogramme-77e2f8abbb2d70413ba571baf405f10572299fd9.tar.gz
aerogramme-77e2f8abbb2d70413ba571baf405f10572299fd9.zip
test include
Diffstat (limited to 'src/dav/encoder.rs')
-rw-r--r--src/dav/encoder.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/dav/encoder.rs b/src/dav/encoder.rs
index a16f498..9e907dc 100644
--- a/src/dav/encoder.rs
+++ b/src/dav/encoder.rs
@@ -959,4 +959,26 @@ mod tests {
assert_eq!(&got, expected, "\n---GOT---\n{got}\n---EXP---\n{expected}\n");
}
+
+
+ #[tokio::test]
+ async fn rfc_allprop_include() {
+ let got = serialize(
+ NoExtension { root: true },
+ &PropFind::AllProp(Some(Include(vec![
+ PropertyRequest::DisplayName,
+ PropertyRequest::ResourceType,
+ ]))),
+ ).await;
+
+ let expected = r#"<D:propfind xmlns:D="DAV:">
+ <D:allprop/>
+ <D:include>
+ <D:displayname/>
+ <D:resourcetype/>
+ </D:include>
+</D:propfind>"#;
+
+ assert_eq!(&got, expected, "\n---GOT---\n{got}\n---EXP---\n{expected}\n");
+ }
}