From ed7dfd6b6566fdd1c5dce4f0406ebee66633923f Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 12 Mar 2025 18:34:38 +0000 Subject: [PATCH] test: remove test_group_with_removed_message_id The test is mostly testing that groups can be matched even if Message-ID is replaced. Delta Chat no longer places group ID into Message-ID or References, so the test is not testing anything other than the ability to match groups based on References header. --- src/chat/chat_tests.rs | 52 ------------------------------------------ 1 file changed, 52 deletions(-) diff --git a/src/chat/chat_tests.rs b/src/chat/chat_tests.rs index fdab808d2..fd503db2e 100644 --- a/src/chat/chat_tests.rs +++ b/src/chat/chat_tests.rs @@ -1615,58 +1615,6 @@ async fn test_lookup_self_by_contact_id() { assert_eq!(chat.blocked, Blocked::Not); } -#[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn test_group_with_removed_message_id() -> Result<()> { - // Alice creates a group with Bob, sends a message to bob - let alice = TestContext::new_alice().await; - let bob = TestContext::new_bob().await; - - let alice_bob_contact = alice.add_or_lookup_contact(&bob).await; - let contact_id = alice_bob_contact.id; - let alice_chat_id = create_group_chat(&alice, ProtectionStatus::Unprotected, "grp").await?; - let alice_chat = Chat::load_from_db(&alice, alice_chat_id).await?; - - add_contact_to_chat(&alice, alice_chat_id, contact_id).await?; - assert_eq!(get_chat_contacts(&alice, alice_chat_id).await?.len(), 2); - send_text_msg(&alice, alice_chat_id, "hi!".to_string()).await?; - assert_eq!(get_chat_msgs(&alice, alice_chat_id).await?.len(), 1); - - // Alice has an SMTP-server replacing the `Message-ID:`-header (as done eg. by outlook.com). - let sent_msg = alice.pop_sent_msg().await; - let msg = sent_msg.payload(); - assert_eq!(msg.match_indices("Message-ID: <").count(), 2); - assert_eq!(msg.match_indices("References: <").count(), 1); - let msg = msg.replace("Message-ID: <", "Message-ID: Result<()> { let t = TestContext::new_alice().await;