Skip to content

Commit cac8d20

Browse files
committed
fix tests::verified_chats::test_create_verified_oneonone_chat
1 parent 5fdf031 commit cac8d20

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/tests/verified_chats.rs

+4-12
Original file line numberDiff line numberDiff line change
@@ -155,27 +155,19 @@ async fn test_create_verified_oneonone_chat() -> Result<()> {
155155
tcm.send_recv(&fiona_new, &alice, "I have a new device")
156156
.await;
157157

158-
// The chat should be and stay unprotected
158+
// Alice gets a new unprotected chat with new Fiona contact.
159159
{
160-
let chat = alice.get_chat(&fiona_new).await;
160+
let chat = alice.get_pgp_chat(&fiona_new).await;
161161
assert!(!chat.is_protected());
162-
assert!(chat.is_protection_broken());
163-
164-
let msg1 = get_chat_msg(&alice, chat.id, 0, 3).await;
165-
assert_eq!(msg1.get_info_type(), SystemMessage::ChatProtectionEnabled);
166-
167-
let msg2 = get_chat_msg(&alice, chat.id, 1, 3).await;
168-
assert_eq!(msg2.get_info_type(), SystemMessage::ChatProtectionDisabled);
169162

170-
let msg2 = get_chat_msg(&alice, chat.id, 2, 3).await;
171-
assert_eq!(msg2.text, "I have a new device");
163+
let msg = get_chat_msg(&alice, chat.id, 0, 1).await;
164+
assert_eq!(msg.text, "I have a new device");
172165

173166
// After recreating the chat, it should still be unprotected
174167
chat.id.delete(&alice).await?;
175168

176169
let chat = alice.create_chat(&fiona_new).await;
177170
assert!(!chat.is_protected());
178-
assert!(!chat.is_protection_broken());
179171
}
180172

181173
Ok(())

0 commit comments

Comments
 (0)