Skip to content

Commit

Permalink
test for ChatDeleted event
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Mar 6, 2025
1 parent 9a915b2 commit 97d8bd8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/chat/chat_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3048,6 +3048,10 @@ async fn test_sync_delete_chat() -> Result<()> {
a0b_chat_id.delete(alice0).await?;
sync(alice0, alice1).await;
alice1.assert_no_chat(a1b_chat_id).await;
alice1
.evtracker
.get_matching(|evt| matches!(evt, EventType::ChatDeleted { .. }))
.await;

let bob_grp_chat_id = bob
.create_group_with_members(ProtectionStatus::Unprotected, "grp", &[alice0])
Expand All @@ -3060,6 +3064,11 @@ async fn test_sync_delete_chat() -> Result<()> {
a0_grp_chat_id.delete(alice0).await?;
sync(alice0, alice1).await;
alice1.assert_no_chat(a1_grp_chat_id).await;
alice0
.evtracker
.get_matching(|evt| matches!(evt, EventType::ChatDeleted { .. }))
.await;

Ok(())
}

Expand Down

0 comments on commit 97d8bd8

Please sign in to comment.