From 50f036d283d90f5352406b14f340acf3367ca851 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Fri, 29 Nov 2024 10:30:07 +0000 Subject: [PATCH] task(crypto_tests): Fix test that will fail when we handle backups correctly 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. --- crates/matrix-sdk-crypto/src/types/events/utd_cause.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/matrix-sdk-crypto/src/types/events/utd_cause.rs b/crates/matrix-sdk-crypto/src/types/events/utd_cause.rs index bc21ab5385d..c7d2a0810fc 100644 --- a/crates/matrix-sdk-crypto/src/types/events/utd_cause.rs +++ b/crates/matrix-sdk-crypto/src/types/events/utd_cause.rs @@ -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