mirror of
https://github.com/chatmail/core.git
synced 2026-05-21 15:56:30 +03:00
Do not prepare the message explicitly in the test context
Explicit `prepare_msg` corresponding to `dc_prepare_msg` is intended only for the case where the message is prepared before the file is ready. It is not indented for calling right before send_msg and requires that file path in the blobdir. With explicit `prepare_msg` removed all the tests still pass but there is no requirement that the file is put into blobdir beforehand.
This commit is contained in:
@@ -599,7 +599,6 @@ impl TestContext {
|
|||||||
/// [`TestContext::recv_msg`] with the returned [`SentMessage`] if it wants to receive
|
/// [`TestContext::recv_msg`] with the returned [`SentMessage`] if it wants to receive
|
||||||
/// the message.
|
/// the message.
|
||||||
pub async fn send_msg(&self, chat_id: ChatId, msg: &mut Message) -> SentMessage<'_> {
|
pub async fn send_msg(&self, chat_id: ChatId, msg: &mut Message) -> SentMessage<'_> {
|
||||||
chat::prepare_msg(self, chat_id, msg).await.unwrap();
|
|
||||||
let msg_id = chat::send_msg(self, chat_id, msg).await.unwrap();
|
let msg_id = chat::send_msg(self, chat_id, msg).await.unwrap();
|
||||||
let res = self.pop_sent_msg().await;
|
let res = self.pop_sent_msg().await;
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|||||||
Reference in New Issue
Block a user