mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Add test for #767
Without a test for this fix, a regression will happen again.
Original PR #767 aka commit 4fed875107
This commit is contained in:
committed by
holger krekel
parent
b01c842d7c
commit
78030e4a31
@@ -1966,4 +1966,13 @@ mod tests {
|
||||
let draft_text = draft.get_text();
|
||||
assert_eq!(msg_text, draft_text);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_add_contact_to_chat_ex_add_self() {
|
||||
// Adding self to a contact should succeed, even though it's pointless.
|
||||
let t = test_context(Some(Box::new(logging_cb)));
|
||||
let chat_id = create_group_chat(&t.ctx, VerifiedStatus::Unverified, "foo").unwrap();
|
||||
let added = add_contact_to_chat_ex(&t.ctx, chat_id, DC_CONTACT_ID_SELF, false).unwrap();
|
||||
assert_eq!(added, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user