diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-03-07 09:49:09 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-03-07 09:49:09 +0100 |
commit | db115ca2478af75e9b9bd712cb8592cdd2a62476 (patch) | |
tree | c47f3fa3272b70111d1fb51cbcd4f5c61c37966e /src/dav | |
parent | 5e71a7d84804a86d049d3e0a614c35bedf7cb636 (diff) | |
download | aerogramme-db115ca2478af75e9b9bd712cb8592cdd2a62476.tar.gz aerogramme-db115ca2478af75e9b9bd712cb8592cdd2a62476.zip |
successful multistatus decoding test
Diffstat (limited to 'src/dav')
-rw-r--r-- | src/dav/decoder.rs | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/src/dav/decoder.rs b/src/dav/decoder.rs index 144cc4e..4acd3e8 100644 --- a/src/dav/decoder.rs +++ b/src/dav/decoder.rs @@ -811,16 +811,52 @@ mod tests { let mut rdr = Reader::new(NsReader::from_reader(src.as_bytes())).await.unwrap(); let got = rdr.find::<Multistatus::<Core, PropName<Core>>>().await.unwrap(); - /*assert_eq!(got, Multistatus { + assert_eq!(got, Multistatus { responses: vec![ Response { - status_or_propstat: + status_or_propstat: StatusOrPropstat::PropStat( + Href("http://www.example.com/container/".into()), + vec![PropStat { + prop: PropName(vec![ + PropertyRequest::CreationDate, + PropertyRequest::DisplayName, + PropertyRequest::ResourceType, + PropertyRequest::SupportedLock, + ]), + status: Status(http::status::StatusCode::OK), + error: None, + responsedescription: None, + }], + ), + error: None, + responsedescription: None, + location: None, + }, + Response { + status_or_propstat: StatusOrPropstat::PropStat( + Href("http://www.example.com/container/front.html".into()), + vec![PropStat { + prop: PropName(vec![ + PropertyRequest::CreationDate, + PropertyRequest::DisplayName, + PropertyRequest::GetContentLength, + PropertyRequest::GetContentType, + PropertyRequest::GetEtag, + PropertyRequest::GetLastModified, + PropertyRequest::ResourceType, + PropertyRequest::SupportedLock, + ]), + status: Status(http::status::StatusCode::OK), + error: None, + responsedescription: None, + }], + ), + error: None, + responsedescription: None, + location: None, }, - Response {}, ], responsedescription: None, - });*/ - + }); } - } |