File tree 1 file changed +25
-1
lines changed
crates/matrix-sdk-crypto/src/types/events
1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -572,7 +572,31 @@ mod tests {
572
572
573
573
#[ test]
574
574
fn test_serialization_cycle ( ) {
575
- let event_json = room_key_event ( ) ;
575
+ let event_json = json ! ( {
576
+ "sender" : "@alice:example.org" ,
577
+ "keys" : {
578
+ "ed25519" : ED25519_KEY ,
579
+ } ,
580
+ "recipient" : "@bob:example.org" ,
581
+ "recipient_keys" : {
582
+ "ed25519" : ED25519_KEY ,
583
+ } ,
584
+ "content" : {
585
+ "algorithm" : "m.megolm.v1.aes-sha2" ,
586
+ "room_id" : "!Cuyf34gef24t:localhost" ,
587
+ "org.matrix.msc3061.shared_history" : true ,
588
+ "session_id" : "ZFD6+OmV7fVCsJ7Gap8UnORH8EnmiAkes8FAvQuCw/I" ,
589
+ "session_key" : "AgAAAADNp1EbxXYOGmJtyX4AkD1bvJvAUyPkbIaKxtnGKjv\
590
+ SQ3E/4mnuqdM4vsmNzpO1EeWzz1rDkUpYhYE9kP7sJhgLXi\
591
+ jVv80fMPHfGc49hPdu8A+xnwD4SQiYdFmSWJOIqsxeo/fiH\
592
+ tino//CDQENtcKuEt0I9s0+Kk4YSH310Szse2RQ+vjple31\
593
+ QrCexmqfFJzkR/BJ5ogJHrPBQL0LgsPyglIbMTLg7qygIaY\
594
+ U5Fe2QdKMH7nTZPNIRHh1RaMfHVETAUJBax88EWZBoifk80\
595
+ gdHUwHSgMk77vCc2a5KHKLDA"
596
+ } ,
597
+ "type" : "m.room_key"
598
+ } ) ;
599
+
576
600
let event: DecryptedRoomKeyEvent = serde_json:: from_value ( event_json. clone ( ) )
577
601
. expect ( "JSON should deserialize to the right event type" ) ;
578
602
You can’t perform that action at this time.
0 commit comments