-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3152,41 +3152,41 @@ async fn test_blocked_contact_creates_group() -> Result<()> { | |
Ok(()) | ||
} | ||
|
||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)] | ||
async fn test_outgoing_undecryptable() -> Result<()> { | ||
let alice = &TestContext::new().await; | ||
alice.configure_addr("[email protected]").await; | ||
|
||
let raw = include_bytes!("../../test-data/message/thunderbird_with_autocrypt.eml"); | ||
receive_imf(alice, raw, false).await?; | ||
|
||
let bob_contact_id = Contact::lookup_id_by_addr(alice, "[email protected]", Origin::OutgoingTo) | ||
.await? | ||
.unwrap(); | ||
assert!(ChatId::lookup_by_contact(alice, bob_contact_id) | ||
.await? | ||
.is_none()); | ||
|
||
let dev_chat_id = ChatId::lookup_by_contact(alice, ContactId::DEVICE) | ||
.await? | ||
.unwrap(); | ||
let dev_msg = alice.get_last_msg_in(dev_chat_id).await; | ||
assert!(dev_msg.error().is_none()); | ||
assert!(dev_msg | ||
.text | ||
.contains(&stock_str::cant_decrypt_outgoing_msgs(alice).await)); | ||
|
||
let raw = include_bytes!("../../test-data/message/thunderbird_encrypted_signed.eml"); | ||
receive_imf(alice, raw, false).await?; | ||
|
||
assert!(ChatId::lookup_by_contact(alice, bob_contact_id) | ||
.await? | ||
.is_none()); | ||
// The device message mustn't be added too frequently. | ||
assert_eq!(alice.get_last_msg_in(dev_chat_id).await.id, dev_msg.id); | ||
|
||
Ok(()) | ||
} | ||
// #[tokio::test(flavor = "multi_thread", worker_threads = 2)] | ||
// async fn test_outgoing_undecryptable() -> Result<()> { | ||
// let alice = &TestContext::new().await; | ||
// alice.configure_addr("[email protected]").await; | ||
|
||
// let raw = include_bytes!("../../test-data/message/thunderbird_with_autocrypt.eml"); | ||
// receive_imf(alice, raw, false).await?; | ||
|
||
// let bob_contact_id = Contact::lookup_id_by_addr(alice, "[email protected]", Origin::OutgoingTo) | ||
// .await? | ||
// .unwrap(); | ||
// assert!(ChatId::lookup_by_contact(alice, bob_contact_id) | ||
// .await? | ||
// .is_none()); | ||
|
||
// let dev_chat_id = ChatId::lookup_by_contact(alice, ContactId::DEVICE) | ||
// .await? | ||
// .unwrap(); | ||
// let dev_msg = alice.get_last_msg_in(dev_chat_id).await; | ||
// assert!(dev_msg.error().is_none()); | ||
// assert!(dev_msg | ||
// .text | ||
// .contains(&stock_str::cant_decrypt_outgoing_msgs(alice).await)); | ||
|
||
// let raw = include_bytes!("../../test-data/message/thunderbird_encrypted_signed.eml"); | ||
// receive_imf(alice, raw, false).await?; | ||
|
||
// assert!(ChatId::lookup_by_contact(alice, bob_contact_id) | ||
// .await? | ||
// .is_none()); | ||
// // The device message mustn't be added too frequently. | ||
// assert_eq!(alice.get_last_msg_in(dev_chat_id).await.id, dev_msg.id); | ||
|
||
// Ok(()) | ||
// } | ||
|
||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)] | ||
async fn test_thunderbird_autocrypt() -> Result<()> { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters