mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 09:26:30 +03:00
Add golden test that only one member-added message is shown for Bob
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
6
test-data/golden/test_sync_broadcast_bob
Normal file
6
test-data/golden/test_sync_broadcast_bob
Normal file
@@ -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]
|
||||
--------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user