mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +03:00
test: add TestContext.allow_unencrypted()
This commit is contained in:
@@ -180,9 +180,10 @@ async fn test_selfavatar_and_autocrypt_gossip_goto_pre_message() -> Result<()> {
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_unecrypted_gets_no_pre_message() -> Result<()> {
|
||||
async fn test_unencrypted_gets_no_pre_message() -> Result<()> {
|
||||
let mut tcm = TestContextManager::new();
|
||||
let alice = &tcm.alice().await;
|
||||
alice.allow_unencrypted().await?;
|
||||
|
||||
let chat = alice
|
||||
.create_chat_with_contact("example", "email@example.org")
|
||||
|
||||
@@ -175,6 +175,7 @@ async fn test_degrade_verified_oneonone_chat() -> Result<()> {
|
||||
let mut tcm = TestContextManager::new();
|
||||
let alice = &tcm.alice().await;
|
||||
let bob = &tcm.bob().await;
|
||||
alice.allow_unencrypted().await?;
|
||||
|
||||
mark_as_verified(alice, bob).await;
|
||||
|
||||
@@ -272,6 +273,7 @@ async fn test_outgoing_mua_msg() -> Result<()> {
|
||||
let mut tcm = TestContextManager::new();
|
||||
let alice = &tcm.alice().await;
|
||||
let bob = &tcm.bob().await;
|
||||
alice.allow_unencrypted().await?;
|
||||
|
||||
mark_as_verified(alice, bob).await;
|
||||
mark_as_verified(bob, alice).await;
|
||||
@@ -333,6 +335,7 @@ async fn test_reply() -> Result<()> {
|
||||
let mut tcm = TestContextManager::new();
|
||||
let alice = tcm.alice().await;
|
||||
let bob = tcm.bob().await;
|
||||
alice.allow_unencrypted().await?;
|
||||
|
||||
if verified {
|
||||
mark_as_verified(&alice, &bob).await;
|
||||
|
||||
Reference in New Issue
Block a user