Webxdc delete event (#3592)

webxdc delete event
This commit is contained in:
Sebastian Klähn
2022-09-11 13:53:55 +02:00
committed by GitHub
parent 40dc182295
commit e619d9690d
9 changed files with 43 additions and 3 deletions

View File

@@ -753,6 +753,7 @@ mod tests {
use crate::chatlist::Chatlist;
use crate::config::Config;
use crate::contact::Contact;
use crate::message;
use crate::receive_imf::{receive_imf, receive_imf_inner};
use crate::test_utils::TestContext;
@@ -2377,4 +2378,17 @@ sth_for_the = "future""#
);
Ok(())
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_webxdc_delete_event() -> Result<()> {
let alice = TestContext::new_alice().await;
let chat_id = create_group_chat(&alice, ProtectionStatus::Unprotected, "foo").await?;
let instance = send_webxdc_instance(&alice, chat_id).await?;
message::delete_msgs(&alice, &[instance.id]).await?;
alice
.evtracker
.get_matching(|evt| matches!(evt, EventType::WebxdcInstanceDeleted { .. }))
.await;
Ok(())
}
}