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

@@ -1287,10 +1287,7 @@ mod tests {
// Now Alice's chat with Bob should still be hidden, the verified message should
// appear in the group chat.
let chat = alice
.get_chat(&bob)
.await
.expect("Alice has no 1:1 chat with bob");
let chat = alice.get_chat(&bob).await;
assert_eq!(
chat.blocked,
Blocked::Yes,
@@ -1325,10 +1322,7 @@ mod tests {
contact_alice.is_verified(&bob.ctx).await?,
VerifiedStatus::BidirectVerified
);
let chat = bob
.get_chat(&alice)
.await
.expect("Bob has no 1:1 chat with Alice");
let chat = bob.get_chat(&alice).await;
assert_eq!(
chat.blocked,
Blocked::Yes,