crypto: Test the outgoing requests method instead of accessing the field.

master
Damir Jelić 2020-09-24 12:00:22 +02:00
parent c5bece2d58
commit 42c4cf2a30
1 changed files with 4 additions and 4 deletions

View File

@ -369,7 +369,7 @@ mod test {
fn create_machine() {
let machine = get_machine();
assert!(machine.outgoing_to_device_requests.is_empty());
assert!(machine.outgoing_to_device_requests().is_empty());
}
#[async_test]
@ -382,7 +382,7 @@ mod test {
.await
.unwrap();
assert!(machine.outgoing_to_device_requests.is_empty());
assert!(machine.outgoing_to_device_requests().is_empty());
machine
.create_outgoing_key_request(
session.room_id(),
@ -391,8 +391,8 @@ mod test {
)
.await
.unwrap();
assert!(!machine.outgoing_to_device_requests.is_empty());
assert_eq!(machine.outgoing_to_device_requests.len(), 1);
assert!(!machine.outgoing_to_device_requests().is_empty());
assert_eq!(machine.outgoing_to_device_requests().len(), 1);
machine
.create_outgoing_key_request(