diff --git a/Cargo.lock b/Cargo.lock
index 8e7ec1f..cc71bc6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1797,6 +1797,7 @@ checksum = "b5c943d4415edd8153251b6f197de5eb1640e56d84e8d9159bea190421c73698"
dependencies = [
"console",
"once_cell",
+ "regex",
"similar",
]
diff --git a/Cargo.toml b/Cargo.toml
index 1348469..67f9469 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -149,7 +149,7 @@ ece = { version = "2.3", default-features = false, features = [
openssl = { version = "0.10", features = ["vendored"] }
async-std = { version = "1.13", features = ["attributes"] }
similar-asserts = "1.7"
-insta = "1.44"
+insta = { version = "1.44", features = ["filters"] }
[dev-dependencies]
rstest.workspace = true
diff --git a/src/integration_tests/caldav/calendar.rs b/src/integration_tests/caldav/calendar.rs
index d09d7eb..466e7fe 100644
--- a/src/integration_tests/caldav/calendar.rs
+++ b/src/integration_tests/caldav/calendar.rs
@@ -88,7 +88,13 @@ async fn test_caldav_calendar(
let response = app.clone().oneshot(request).await.unwrap();
assert_eq!(response.status(), StatusCode::MULTI_STATUS);
let body = response.extract_string().await;
- insta::assert_snapshot!(body);
+ insta::with_settings!({
+ filters => vec![
+ (r"[0-9a-f-]+", "[PUSH_TOPIC]")
+ ]
+ }, {
+ insta::assert_snapshot!(body);
+ });
let mut request = Request::builder()
.method("DELETE")
diff --git a/src/integration_tests/caldav/mod.rs b/src/integration_tests/caldav/mod.rs
index 85cffbc..c65ad00 100644
--- a/src/integration_tests/caldav/mod.rs
+++ b/src/integration_tests/caldav/mod.rs
@@ -109,5 +109,11 @@ async fn test_caldav_principal(
let response = app.clone().oneshot(request).await.unwrap();
assert_eq!(response.status(), StatusCode::MULTI_STATUS);
let body = response.extract_string().await;
- insta::assert_snapshot!(body);
+ insta::with_settings!({
+ filters => vec![
+ (r"[0-9a-f-]+", "[PUSH_TOPIC]")
+ ]
+ }, {
+ insta::assert_snapshot!(body);
+ });
}
diff --git a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__caldav_principal-4.snap b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__caldav_principal-4.snap
index 46158ec..a4a1aa1 100644
--- a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__caldav_principal-4.snap
+++ b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__caldav_principal-4.snap
@@ -209,7 +209,7 @@ END:VCALENDAR
- 89828c25-cc5c-481a-bb3b-cde435cf9393
+ [PUSH_TOPIC]
1
diff --git a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__caldav_calendar-4.snap b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__caldav_calendar-4.snap
index 9231300..390da39 100644
--- a/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__caldav_calendar-4.snap
+++ b/src/integration_tests/caldav/snapshots/rustical__integration_tests__caldav__calendar__caldav_calendar-4.snap
@@ -163,7 +163,7 @@ END:VCALENDAR
- 89828c25-cc5c-481a-bb3b-cde435cf9393
+ [PUSH_TOPIC]
1