mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 06:26:30 +03:00
test: transfer vCards in TestContext.create_chat()
SecureJoin and importing a vCard are the primary ways we want to support for creating contacts. Typing in an email address and relying on Autocrypt results in sending the first message unencrypted and we want to clearly separate unencrypted and encrypted chats in the future. To make the tests more stable, we set up test contacts with vCards as this always immediately results in creating a single encrypted chat and this is not going to change.
This commit is contained in:
@@ -726,7 +726,7 @@ async fn test_send_webxdc_status_update() -> Result<()> {
|
||||
let bob = TestContext::new_bob().await;
|
||||
|
||||
// Alice sends an webxdc instance and a status update
|
||||
let alice_chat = alice.create_chat(&bob).await;
|
||||
let alice_chat = alice.create_email_chat(&bob).await;
|
||||
let alice_instance = send_webxdc_instance(&alice, alice_chat.id).await?;
|
||||
let sent1 = &alice.pop_sent_msg().await;
|
||||
assert_eq!(alice_instance.viewtype, Viewtype::Webxdc);
|
||||
@@ -1022,7 +1022,7 @@ async fn test_pop_status_update() -> Result<()> {
|
||||
async fn test_draft_and_send_webxdc_status_update() -> Result<()> {
|
||||
let alice = TestContext::new_alice().await;
|
||||
let bob = TestContext::new_bob().await;
|
||||
let alice_chat_id = alice.create_chat(&bob).await.id;
|
||||
let alice_chat_id = alice.create_email_chat(&bob).await.id;
|
||||
|
||||
// prepare webxdc instance,
|
||||
// status updates are not sent for drafts, therefore send_webxdc_status_update() returns Ok(None)
|
||||
|
||||
Reference in New Issue
Block a user