Skip to content

Commit

Permalink
task(crypto_tests): Fix test that will fail when we handle backups co…
Browse files Browse the repository at this point in the history
…rrectly

This test was checking that a new device which has access to backups
returned an unknown UTD when it was given empty JSON for the event. It
was only passing because we currently have incorrect behaviour when
backups are enabled.

The fix is to make the device old and without access to backups, so that
we still consider this UTD unexpected.
  • Loading branch information
andybalaam committed Dec 2, 2024
1 parent 8c73f0c commit 50f036d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/matrix-sdk-crypto/src/types/events/utd_cause.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ mod tests {
assert_eq!(
UtdCause::determine(
&raw_event(json!({})),
device_new_with_backup(),
device_old_no_backup(),
&missing_megolm_session()
),
UtdCause::Unknown
Expand Down

0 comments on commit 50f036d

Please sign in to comment.