Skip to content

Commit 5f0503b

Browse files
committed
If 1st param of assert_json_snapshot missed, it generates snapshot by the same name with test fn
1 parent 0055f8f commit 5f0503b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/matrix-sdk-crypto/src/types/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ mod test {
552552

553553
#[test]
554554
fn snapshot_backup_decryption_key() {
555+
let decryption_key = BackupDecryptionKey { inner: Box::new([1u8; 32]) };
555556
with_settings!({ sort_maps => true, prepend_module_to_snapshot => false }, {
556-
let decryption_key = BackupDecryptionKey { inner: Box::new([1u8; 32]) };
557557
assert_json_snapshot!("BackupDecryptionKey_json", decryption_key);
558558

559559
// should not log the key !
@@ -593,7 +593,7 @@ mod test {
593593
]));
594594

595595
with_settings!({ sort_maps => true, prepend_module_to_snapshot => false }, {
596-
assert_json_snapshot!("Signatures", signatures)
596+
assert_json_snapshot!(signatures)
597597
});
598598
}
599599

@@ -614,7 +614,7 @@ mod test {
614614
};
615615

616616
with_settings!({ sort_maps => true, prepend_module_to_snapshot => false }, {
617-
assert_json_snapshot!("SecretsBundle_backup_some", secret_bundle);
617+
assert_json_snapshot!("SecretsBundle_backup_some", secret_bundle)
618618
});
619619

620620
let secret_bundle = SecretsBundle {
@@ -627,7 +627,7 @@ mod test {
627627
};
628628

629629
with_settings!({ sort_maps => true, prepend_module_to_snapshot => false }, {
630-
assert_json_snapshot!("SecretsBundle_backup_none", secret_bundle);
630+
assert_json_snapshot!("SecretsBundle_backup_none", secret_bundle)
631631
});
632632
}
633633
}

0 commit comments

Comments
 (0)