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 55ca4e0f22a..b88a7898cda 100644 --- a/crates/matrix-sdk-crypto/src/types/events/utd_cause.rs +++ b/crates/matrix-sdk-crypto/src/types/events/utd_cause.rs @@ -158,7 +158,7 @@ mod tests { assert_eq!( UtdCause::determine( &raw_event(json!({})), - device_new_with_backup(), + device_old_no_backup(), &missing_megolm_session() ), UtdCause::Unknown @@ -393,6 +393,13 @@ mod tests { Raw::from_json(to_raw_value(&value).unwrap()) } + fn device_old_no_backup() -> CryptoContextInfo { + CryptoContextInfo { + device_creation_ts: MilliSecondsSinceUnixEpoch((1111).try_into().unwrap()), + is_backup_configured: false, + } + } + fn device_old_with_backup() -> CryptoContextInfo { CryptoContextInfo { device_creation_ts: MilliSecondsSinceUnixEpoch((1111).try_into().unwrap()),