()
| 333 | |
| 334 | #[tokio::test(flavor = "multi_thread", worker_threads = 2)] |
| 335 | async fn test_delete_webxdc_instance() -> Result<()> { |
| 336 | let t = TestContext::new_alice().await; |
| 337 | let chat_id = create_group(&t, "foo").await?; |
| 338 | let instance = send_webxdc_instance(&t, chat_id).await?; |
| 339 | let now = tools::time(); |
| 340 | t.receive_status_update( |
| 341 | ContactId::SELF, |
| 342 | &instance, |
| 343 | now, |
| 344 | true, |
| 345 | r#"{"updates":[{"payload":1}]}"#, |
| 346 | ) |
| 347 | .await?; |
| 348 | assert_eq!( |
| 349 | t.sql |
| 350 | .count("SELECT COUNT(*) FROM msgs_status_updates;", ()) |
| 351 | .await?, |
| 352 | 1 |
| 353 | ); |
| 354 | |
| 355 | message::delete_msgs(&t, &[instance.id]).await?; |
| 356 | sql::housekeeping(&t).await?; |
| 357 | assert_eq!( |
| 358 | t.sql |
| 359 | .count("SELECT COUNT(*) FROM msgs_status_updates;", ()) |
| 360 | .await?, |
| 361 | 0 |
| 362 | ); |
| 363 | |
| 364 | Ok(()) |
| 365 | } |
| 366 | |
| 367 | #[tokio::test(flavor = "multi_thread", worker_threads = 2)] |
| 368 | async fn test_delete_chat_with_webxdc() -> Result<()> { |
nothing calls this directly
no test coverage detected