mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +03:00
test: Add golden test for Alice's side, too, in test_sync_broadcast
This commit is contained in:
@@ -4110,16 +4110,22 @@ async fn test_sync_broadcast() -> Result<()> {
|
||||
let bob_chat = Chat::load_from_db(bob, bob_broadcast_id).await?;
|
||||
assert!(!bob_chat.is_self_in_chat(bob).await?);
|
||||
|
||||
bob.golden_test_chat(bob_broadcast_id, "test_sync_broadcast_bob")
|
||||
.await;
|
||||
|
||||
// Alice1 and Alice2 are supposed to show the chat in the same way:
|
||||
alice1
|
||||
.golden_test_chat(a1_broadcast_id, "test_sync_broadcast_alice")
|
||||
.await;
|
||||
alice2
|
||||
.golden_test_chat(a2_broadcast_id, "test_sync_broadcast_alice")
|
||||
.await;
|
||||
|
||||
tcm.section("Alice's first device deletes the chat");
|
||||
a1_broadcast_id.delete(alice1).await?;
|
||||
sync(alice1, alice2).await;
|
||||
alice2.assert_no_chat(a2_broadcast_id).await;
|
||||
|
||||
// TODO test if Alice's second device shows duplicate member-added messages
|
||||
|
||||
bob.golden_test_chat(bob_broadcast_id, "test_sync_broadcast_bob")
|
||||
.await;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
6
test-data/golden/test_sync_broadcast_alice
Normal file
6
test-data/golden/test_sync_broadcast_alice
Normal file
@@ -0,0 +1,6 @@
|
||||
OutBroadcast#Chat#10: Channel [0 member(s)]
|
||||
--------------------------------------------------------------------------------
|
||||
Msg#13🔒: Me (Contact#Contact#Self): Member bob@example.net added. [INFO] √
|
||||
Msg#15🔒: Me (Contact#Contact#Self): hi √
|
||||
Msg#16🔒: Me (Contact#Contact#Self): You removed member bob@example.net. [INFO] √
|
||||
--------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user