crypto: test: factor out redundant variable

This thing was confusing. What is "legacy" about it?
This commit is contained in:
Richard van der Hoff
2024-08-14 14:17:45 +01:00
committed by Richard van der Hoff
parent 324cf2e007
commit a240b87ba6

View File

@@ -467,14 +467,14 @@ mod tests {
async fn test_share_with_per_device_strategy_to_all() {
let machine = set_up_test_machine().await;
let legacy_strategy = CollectStrategy::DeviceBasedStrategy {
only_allow_trusted_devices: false,
error_on_verified_user_problem: false,
let encryption_settings = EncryptionSettings {
sharing_strategy: CollectStrategy::DeviceBasedStrategy {
only_allow_trusted_devices: false,
error_on_verified_user_problem: false,
},
..Default::default()
};
let encryption_settings =
EncryptionSettings { sharing_strategy: legacy_strategy.clone(), ..Default::default() };
let group_session = create_test_outbound_group_session(&machine, &encryption_settings);
let share_result = collect_session_recipients(
@@ -510,14 +510,14 @@ mod tests {
async fn test_share_with_per_device_strategy_only_trusted() {
let machine = set_up_test_machine().await;
let legacy_strategy = CollectStrategy::DeviceBasedStrategy {
only_allow_trusted_devices: true,
error_on_verified_user_problem: false,
let encryption_settings = EncryptionSettings {
sharing_strategy: CollectStrategy::DeviceBasedStrategy {
only_allow_trusted_devices: true,
error_on_verified_user_problem: false,
},
..Default::default()
};
let encryption_settings =
EncryptionSettings { sharing_strategy: legacy_strategy.clone(), ..Default::default() };
let group_session = create_test_outbound_group_session(&machine, &encryption_settings);
let share_result = collect_session_recipients(