mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
Adapt to new TestContext api
The newer API is more consistent with it's naming. This is somehow fallout from a master rebase.
This commit is contained in:
12
src/html.rs
12
src/html.rs
@@ -451,7 +451,9 @@ test some special html-characters as < > and & but also " and &#x
|
||||
// alice receives a non-delta html-message
|
||||
let alice = TestContext::new_alice().await;
|
||||
alice.set_config(Config::ShowEmails, Some("2")).await.ok();
|
||||
let chat = alice.chat_with_contact("", "sender@testrun.org").await;
|
||||
let chat = alice
|
||||
.create_chat_with_contact("", "sender@testrun.org")
|
||||
.await;
|
||||
let raw = include_bytes!("../test-data/message/text_alt_plain_html.eml");
|
||||
dc_receive_imf(&alice, raw, "INBOX", 1, false)
|
||||
.await
|
||||
@@ -466,7 +468,7 @@ test some special html-characters as < > and & but also " and &#x
|
||||
assert!(html.find("this is <b>html</b>").is_some());
|
||||
|
||||
// alice: create chat with bob and forward received html-message there
|
||||
let chat = alice.chat_with_contact("", "bob@example.net").await;
|
||||
let chat = alice.create_chat_with_contact("", "bob@example.net").await;
|
||||
forward_msgs(&alice, &[msg.get_id()], chat.get_id())
|
||||
.await
|
||||
.unwrap();
|
||||
@@ -481,7 +483,7 @@ test some special html-characters as < > and & but also " and &#x
|
||||
|
||||
// bob: check that bob also got the html-part of the forwarded message
|
||||
let bob = TestContext::new_bob().await;
|
||||
let chat = bob.chat_with_contact("", "alice@example.com").await;
|
||||
let chat = bob.create_chat_with_contact("", "alice@example.com").await;
|
||||
bob.recv_msg(&alice.pop_sent_msg().await).await;
|
||||
let msg = bob.get_last_msg_in(chat.get_id()).await;
|
||||
assert_ne!(msg.get_from_id(), DC_CONTACT_ID_SELF);
|
||||
@@ -500,7 +502,9 @@ test some special html-characters as < > and & but also " and &#x
|
||||
// the contact is marked as known by creating a chat using `chat_with_contact()`)
|
||||
let alice = TestContext::new_alice().await;
|
||||
alice.set_config(Config::ShowEmails, Some("1")).await.ok();
|
||||
let chat = alice.chat_with_contact("", "sender@testrun.org").await;
|
||||
let chat = alice
|
||||
.create_chat_with_contact("", "sender@testrun.org")
|
||||
.await;
|
||||
let raw = include_bytes!("../test-data/message/text_alt_plain_html.eml");
|
||||
dc_receive_imf(&alice, raw, "INBOX", 1, false)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user