From 9fc099f6f4e8a6a3a241089dfe3015b3adee3d83 Mon Sep 17 00:00:00 2001 From: Lennart <18233294+lennart-k@users.noreply.github.com> Date: Wed, 31 Dec 2025 01:30:35 +0100 Subject: [PATCH] fix carddav integration tests --- src/integration_tests/carddav/addressbook.rs | 4 +- ...ts__carddav__addressbook__delete_body.snap | 5 ++ ...tests__carddav__addressbook__get_body.snap | 5 ++ ...sts__carddav__addressbook__mkcol_body.snap | 5 ++ ...__carddav__addressbook__propfind_body.snap | 63 +++++++++++++++++++ ..._carddav__addressbook__proppatch_body.snap | 28 +++++++++ 6 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__delete_body.snap create mode 100644 src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__get_body.snap create mode 100644 src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__mkcol_body.snap create mode 100644 src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__propfind_body.snap create mode 100644 src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__proppatch_body.snap diff --git a/src/integration_tests/carddav/addressbook.rs b/src/integration_tests/carddav/addressbook.rs index 3094406..0f1aae7 100644 --- a/src/integration_tests/carddav/addressbook.rs +++ b/src/integration_tests/carddav/addressbook.rs @@ -30,7 +30,7 @@ fn mkcol_template(displayname: &str, description: &str) -> String { #[rstest] #[tokio::test] -async fn test_caldav_calendar( +async fn test_carddav_addressbook( #[from(test_store_context)] #[future] context: TestStoreContext, @@ -48,7 +48,7 @@ async fn test_caldav_calendar( let request_template = || { Request::builder() - .method("MKCALENDAR") + .method("MKCOL") .uri(&url) .body(Body::from(mkcol_template( displayname.as_ref().unwrap(), diff --git a/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__delete_body.snap b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__delete_body.snap new file mode 100644 index 0000000..e886956 --- /dev/null +++ b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__delete_body.snap @@ -0,0 +1,5 @@ +--- +source: src/integration_tests/carddav/addressbook.rs +expression: body +--- + diff --git a/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__get_body.snap b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__get_body.snap new file mode 100644 index 0000000..e886956 --- /dev/null +++ b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__get_body.snap @@ -0,0 +1,5 @@ +--- +source: src/integration_tests/carddav/addressbook.rs +expression: body +--- + diff --git a/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__mkcol_body.snap b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__mkcol_body.snap new file mode 100644 index 0000000..e886956 --- /dev/null +++ b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__mkcol_body.snap @@ -0,0 +1,5 @@ +--- +source: src/integration_tests/carddav/addressbook.rs +expression: body +--- + 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 new file mode 100644 index 0000000..0d6ff30 --- /dev/null +++ b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__propfind_body.snap @@ -0,0 +1,63 @@ +--- +source: src/integration_tests/carddav/addressbook.rs +expression: body +--- + + + + /carddav/principal/user/contacts/ + + + Amazing contacts! + + + + + + + + + + + + + + + + + 10000000 + github.com/lennart-k/rustical/ns/0 + github.com/lennart-k/rustical/ns/0 + + + + [PUSH_TOPIC] + + + 1 + + + 1 + + + + + + + Contacts + + /carddav/principal/user/ + + + + + + + + /carddav/principal/user/ + + + HTTP/1.1 200 OK + + + 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 new file mode 100644 index 0000000..7292103 --- /dev/null +++ b/src/integration_tests/carddav/snapshots/rustical__integration_tests__carddav__addressbook__proppatch_body.snap @@ -0,0 +1,28 @@ +--- +source: src/integration_tests/carddav/addressbook.rs +expression: body +--- + + + + /carddav/principal/user/contacts + + + + + + + HTTP/1.1 200 OK + + + + + HTTP/1.1 404 Not Found + + + + + HTTP/1.1 409 Conflict + + +