fix integration tests

This commit is contained in:
Lennart
2025-12-12 14:46:10 +01:00
parent ed8a9e718a
commit 50a74e3a25
6 changed files with 18 additions and 5 deletions

View File

@@ -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"<PUSH:topic>[0-9a-f-]+</PUSH:topic>", "[PUSH_TOPIC]")
]
}, {
insta::assert_snapshot!(body);
});
let mut request = Request::builder()
.method("DELETE")

View File

@@ -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"<PUSH:topic>[0-9a-f-]+</PUSH:topic>", "[PUSH_TOPIC]")
]
}, {
insta::assert_snapshot!(body);
});
}

View File

@@ -209,7 +209,7 @@ END:VCALENDAR
<PUSH:transports>
<PUSH:web-push/>
</PUSH:transports>
<PUSH:topic>89828c25-cc5c-481a-bb3b-cde435cf9393</PUSH:topic>
[PUSH_TOPIC]
<PUSH:supported-triggers>
<PUSH:content-update>
<depth>1</depth>

View File

@@ -163,7 +163,7 @@ END:VCALENDAR
<PUSH:transports>
<PUSH:web-push/>
</PUSH:transports>
<PUSH:topic>89828c25-cc5c-481a-bb3b-cde435cf9393</PUSH:topic>
[PUSH_TOPIC]
<PUSH:supported-triggers>
<PUSH:content-update>
<depth>1</depth>