Skip to content

Commit c3c6025

Browse files
committed
refactor(tests): Take a reference to content in send_and_receive_encrypted_to_device_test_helper
This will allow us to re-use it in more tests.
1 parent 94b28a1 commit c3c6025

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/matrix-sdk-crypto/src/machine/test_helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pub async fn send_and_receive_encrypted_to_device_test_helper(
187187
sender: &OlmMachine,
188188
recipient: &OlmMachine,
189189
event_type: &str,
190-
content: Value,
190+
content: &Value,
191191
) -> ProcessedToDeviceEvent {
192192
let device =
193193
sender.get_device(recipient.user_id(), recipient.device_id(), None).await.unwrap().unwrap();

crates/matrix-sdk-crypto/src/machine/tests/send_encrypted_to_device.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ async fn test_send_olm_encryption_info_unverified_identity() {
226226
&alice,
227227
&bob,
228228
custom_event_type,
229-
custom_content,
229+
&custom_content,
230230
)
231231
.await;
232232

@@ -266,7 +266,7 @@ async fn test_send_olm_encryption_info_verified_identity() {
266266
&alice,
267267
&bob,
268268
custom_event_type,
269-
custom_content,
269+
&custom_content,
270270
)
271271
.await;
272272

@@ -302,7 +302,7 @@ async fn test_send_olm_encryption_info_verified_locally() {
302302
&alice,
303303
&bob,
304304
custom_event_type,
305-
custom_content,
305+
&custom_content,
306306
)
307307
.await;
308308

@@ -344,7 +344,7 @@ async fn test_send_olm_encryption_info_verification_violation() {
344344
&alice,
345345
&bob,
346346
custom_event_type,
347-
custom_content,
347+
&custom_content,
348348
)
349349
.await;
350350

0 commit comments

Comments
 (0)