Skip to content

Commit f5a7d3d

Browse files
committed
Reduce path of snapshot file so that allowed by windows filesystem
1 parent 0f19479 commit f5a7d3d

7 files changed

+38
-12
lines changed

crates/matrix-sdk-common/src/deserialized_responses.rs

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,12 +1359,32 @@ mod tests {
13591359

13601360
#[test]
13611361
fn snapshot_test_shield_codes() {
1362-
assert_json_snapshot!(ShieldStateCode::AuthenticityNotGuaranteed);
1363-
assert_json_snapshot!(ShieldStateCode::UnknownDevice);
1364-
assert_json_snapshot!(ShieldStateCode::UnsignedDevice);
1365-
assert_json_snapshot!(ShieldStateCode::UnverifiedIdentity);
1366-
assert_json_snapshot!(ShieldStateCode::SentInClear);
1367-
assert_json_snapshot!(ShieldStateCode::VerificationViolation);
1362+
with_settings!({prepend_module_to_snapshot => false}, {
1363+
assert_json_snapshot!(
1364+
"ShieldStateCode__AuthenticityNotGuaranteed",
1365+
ShieldStateCode::AuthenticityNotGuaranteed,
1366+
);
1367+
assert_json_snapshot!(
1368+
"ShieldStateCode__UnknownDevice",
1369+
ShieldStateCode::UnknownDevice,
1370+
);
1371+
assert_json_snapshot!(
1372+
"ShieldStateCode__UnsignedDevice",
1373+
ShieldStateCode::UnsignedDevice,
1374+
);
1375+
assert_json_snapshot!(
1376+
"ShieldStateCode__UnverifiedIdentity",
1377+
ShieldStateCode::UnverifiedIdentity,
1378+
);
1379+
assert_json_snapshot!(
1380+
"ShieldStateCode__SentInClear",
1381+
ShieldStateCode::SentInClear,
1382+
);
1383+
assert_json_snapshot!(
1384+
"ShieldStateCode__VerificationViolation",
1385+
ShieldStateCode::VerificationViolation,
1386+
);
1387+
});
13681388
}
13691389

13701390
#[test]
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
source: crates/matrix-sdk-common/src/deserialized_responses.rs
3-
expression: "serde_json::to_value(&code).unwrap()"
3+
expression: "ShieldStateCode::AuthenticityNotGuaranteed"
4+
snapshot_kind: text
45
---
56
"AuthenticityNotGuaranteed"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
source: crates/matrix-sdk-common/src/deserialized_responses.rs
3-
expression: "serde_json::to_value(&code).unwrap()"
3+
expression: "ShieldStateCode::SentInClear"
4+
snapshot_kind: text
45
---
56
"SentInClear"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
source: crates/matrix-sdk-common/src/deserialized_responses.rs
3-
expression: "serde_json::to_value(&code).unwrap()"
3+
expression: "ShieldStateCode::UnknownDevice"
4+
snapshot_kind: text
45
---
56
"UnknownDevice"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
source: crates/matrix-sdk-common/src/deserialized_responses.rs
3-
expression: "serde_json::to_value(&code).unwrap()"
3+
expression: "ShieldStateCode::UnsignedDevice"
4+
snapshot_kind: text
45
---
56
"UnsignedDevice"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
source: crates/matrix-sdk-common/src/deserialized_responses.rs
3-
expression: "serde_json::to_value(&code).unwrap()"
3+
expression: "ShieldStateCode::UnverifiedIdentity"
4+
snapshot_kind: text
45
---
56
"UnverifiedIdentity"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
source: crates/matrix-sdk-common/src/deserialized_responses.rs
3-
expression: "serde_json::to_value(&code).unwrap()"
3+
expression: "ShieldStateCode::VerificationViolation"
4+
snapshot_kind: text
45
---
56
"VerificationViolation"

0 commit comments

Comments
 (0)