test: Directly unwrap in TestContext::get_chat() (#4614)

Directly unwrap in TestContext::get_chat()

Turns out that all usages of get_chat() directly unwrapped, because in a
test it doesn't make sense to handle the error of there being no chat.
This commit is contained in:
Hocuri
2023-08-08 11:34:52 +02:00
committed by GitHub
parent 3ab181fdf8
commit 885f26ea8c
4 changed files with 21 additions and 25 deletions

View File

@@ -2941,7 +2941,7 @@ async fn test_outgoing_private_reply_multidevice() -> Result<()> {
let received = alice2.get_last_msg().await;
// That's a regression test for https://github.com/deltachat/deltachat-core-rust/issues/2949:
assert_eq!(received.chat_id, alice2.get_chat(&bob).await.unwrap().id);
assert_eq!(received.chat_id, alice2.get_chat(&bob).await.id);
let alice2_bob_contact = alice2.add_or_lookup_contact(&bob).await;
assert_eq!(received.from_id, ContactId::SELF);