diff --git a/src/chat/chat_tests.rs b/src/chat/chat_tests.rs index b9faca496..e251087fd 100644 --- a/src/chat/chat_tests.rs +++ b/src/chat/chat_tests.rs @@ -3893,14 +3893,11 @@ async fn test_sync_broadcast() -> Result<()> { .await .unwrap(); sync(alice0, alice1).await; // Sync QR code - tcm.exec_securejoin_qr_multi_device(bob, &[alice0, alice1], &qr) + let bob_broadcast_id = tcm + .exec_securejoin_qr_multi_device(bob, &[alice0, alice1], &qr) .await; - // This also imports Bob's key from the vCard. - // Otherwise it is possible that second device - // does not have Bob's key as only the fingerprint - // is transferred in the sync message. - let a1b_contact_id = alice1.add_or_lookup_contact(bob).await.id; + let a1b_contact_id = alice1.add_or_lookup_contact_no_key(bob).await.id; assert_eq!( get_chat_contacts(alice1, a1_broadcast_id).await?, vec![a1b_contact_id] @@ -3923,6 +3920,10 @@ async fn test_sync_broadcast() -> Result<()> { a0_broadcast_id.delete(alice0).await?; sync(alice0, alice1).await; alice1.assert_no_chat(a1_broadcast_id).await; + + bob.golden_test_chat(bob_broadcast_id, "test_sync_broadcast_bob") + .await; + Ok(()) } diff --git a/test-data/golden/test_sync_broadcast_bob b/test-data/golden/test_sync_broadcast_bob new file mode 100644 index 000000000..7aeec5a19 --- /dev/null +++ b/test-data/golden/test_sync_broadcast_bob @@ -0,0 +1,6 @@ +InBroadcast#Chat#11: Channel [1 member(s)] +-------------------------------------------------------------------------------- +Msg#11: info (Contact#Contact#Info): Establishing guaranteed end-to-end encryption, please waitโ€ฆ [NOTICED][INFO] +Msg#12๐Ÿ”’: (Contact#Contact#10): Member Me added by alice@example.org. [FRESH][INFO] +Msg#13๐Ÿ”’: (Contact#Contact#10): hi [FRESH] +--------------------------------------------------------------------------------