mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 13:32:16 +00:00
fix integration tests
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -1797,6 +1797,7 @@ checksum = "b5c943d4415edd8153251b6f197de5eb1640e56d84e8d9159bea190421c73698"
|
||||
dependencies = [
|
||||
"console",
|
||||
"once_cell",
|
||||
"regex",
|
||||
"similar",
|
||||
]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user