File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -2196,3 +2196,24 @@ async fn test_webxdc_href() -> Result<()> {
2196
2196
2197
2197
Ok ( ( ) )
2198
2198
}
2199
+
2200
+ /// Test that the draft `selfAddr` is equal to the `selfAddr` of the sent message.
2201
+ #[ tokio:: test( flavor = "multi_thread" , worker_threads = 2 ) ]
2202
+ async fn test_self_addr_consistency ( ) -> Result < ( ) > {
2203
+ let mut tcm = TestContextManager :: new ( ) ;
2204
+ let alice = & tcm. alice ( ) . await ;
2205
+ let alice_chat = alice
2206
+ . create_group_with_members ( ProtectionStatus :: Unprotected , "No friends :(" , & [ ] )
2207
+ . await ;
2208
+ let mut instance = create_webxdc_instance (
2209
+ alice,
2210
+ "minimal.xdc" ,
2211
+ include_bytes ! ( "../../test-data/webxdc/minimal.xdc" ) ,
2212
+ ) ?;
2213
+ alice_chat. set_draft ( alice, Some ( & mut instance) ) . await ?;
2214
+ let self_addr = instance. get_webxdc_self_addr ( alice) . await ?;
2215
+ let sent = alice. send_msg ( alice_chat, & mut instance) . await ;
2216
+ let db_msg = Message :: load_from_db ( alice, sent. sender_msg_id ) . await ?;
2217
+ assert_eq ! ( db_msg. get_webxdc_self_addr( alice) . await ?, self_addr) ;
2218
+ Ok ( ( ) )
2219
+ }
You can’t perform that action at this time.
0 commit comments