@@ -676,7 +676,7 @@ mod tests {
676
676
677
677
use assert_matches:: assert_matches;
678
678
use assert_matches2:: assert_let;
679
- use insta:: assert_snapshot;
679
+ use insta:: { assert_snapshot, with_settings } ;
680
680
use matrix_sdk_common:: deserialized_responses:: WithheldCode ;
681
681
use matrix_sdk_test:: {
682
682
async_test, test_json,
@@ -746,7 +746,9 @@ mod tests {
746
746
fn test_serialize_device_based_strategy ( ) {
747
747
let encryption_settings = all_devices_strategy_settings ( ) ;
748
748
let serialized = serde_json:: to_string ( & encryption_settings) . unwrap ( ) ;
749
- assert_snapshot ! ( serialized) ;
749
+ with_settings ! ( { prepend_module_to_snapshot => false } , {
750
+ assert_snapshot!( serialized)
751
+ } ) ;
750
752
}
751
753
752
754
/// [`CollectStrategy::AllDevices`] used to be known as
@@ -1340,7 +1342,9 @@ mod tests {
1340
1342
. with_dehydrated_device ( bob_dehydrated_device_id, true )
1341
1343
. build_response ( ) ;
1342
1344
allow_duplicates ! {
1343
- with_settings!( { sort_maps => true } , { assert_json_snapshot!( ruma_response_to_json( keys_query. clone( ) ) ) } ) ;
1345
+ with_settings!( { sort_maps => true , prepend_module_to_snapshot => false } , {
1346
+ assert_json_snapshot!( ruma_response_to_json( keys_query. clone( ) ) )
1347
+ } ) ;
1344
1348
}
1345
1349
machine. mark_request_as_sent ( & TransactionId :: new ( ) , & keys_query) . await . unwrap ( ) ;
1346
1350
@@ -1394,7 +1398,9 @@ mod tests {
1394
1398
. with_dehydrated_device ( bob_dehydrated_device_id, false )
1395
1399
. build_response ( ) ;
1396
1400
allow_duplicates ! {
1397
- with_settings!( { sort_maps => true } , { assert_json_snapshot!( ruma_response_to_json( keys_query. clone( ) ) ) } ) ;
1401
+ with_settings!( { sort_maps => true , prepend_module_to_snapshot => false } , {
1402
+ assert_json_snapshot!( ruma_response_to_json( keys_query. clone( ) ) )
1403
+ } ) ;
1398
1404
}
1399
1405
machine. mark_request_as_sent ( & TransactionId :: new ( ) , & keys_query) . await . unwrap ( ) ;
1400
1406
@@ -1460,7 +1466,9 @@ mod tests {
1460
1466
. with_dehydrated_device ( bob_dehydrated_device_id, true )
1461
1467
. build_response ( ) ;
1462
1468
allow_duplicates ! {
1463
- with_settings!( { sort_maps => true } , { assert_json_snapshot!( ruma_response_to_json( keys_query. clone( ) ) ) } ) ;
1469
+ with_settings!( { sort_maps => true , prepend_module_to_snapshot => false } , {
1470
+ assert_json_snapshot!( ruma_response_to_json( keys_query. clone( ) ) )
1471
+ } ) ;
1464
1472
}
1465
1473
machine. mark_request_as_sent ( & TransactionId :: new ( ) , & keys_query) . await . unwrap ( ) ;
1466
1474
@@ -1589,7 +1597,9 @@ mod tests {
1589
1597
. with_dehydrated_device ( bob_dehydrated_device_id, true )
1590
1598
. build_response ( ) ;
1591
1599
allow_duplicates ! {
1592
- with_settings!( { sort_maps => true } , { assert_json_snapshot!( ruma_response_to_json( keys_query. clone( ) ) ) } ) ;
1600
+ with_settings!( { sort_maps => true , prepend_module_to_snapshot => false } , {
1601
+ assert_json_snapshot!( ruma_response_to_json( keys_query. clone( ) ) )
1602
+ } ) ;
1593
1603
}
1594
1604
machine. mark_request_as_sent ( & TransactionId :: new ( ) , & keys_query) . await . unwrap ( ) ;
1595
1605
0 commit comments