MCPcopy Create free account
hub / github.com/chatmail/core / test_sync_force_encryption

Function test_sync_force_encryption

src/sync.rs:816–831  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

814 /// Tests that "force encryption" setting is synced.
815 #[tokio::test(flavor = "multi_thread", worker_threads = 2)]
816 async fn test_sync_force_encryption() -> Result<()> {
817 let mut tcm = TestContextManager::new();
818 let alice = &tcm.alice().await;
819 let alice2 = &tcm.alice().await;
820 alice.set_config_bool(Config::SyncMsgs, true).await?;
821 alice2.set_config_bool(Config::SyncMsgs, true).await?;
822
823 assert_eq!(alice.get_config_bool(Config::ForceEncryption).await?, true);
824 alice2
825 .set_config_bool(Config::ForceEncryption, false)
826 .await?;
827 test_utils::sync(alice2, alice).await;
828 assert_eq!(alice.get_config_bool(Config::ForceEncryption).await?, false);
829
830 Ok(())
831 }
832}

Callers

nothing calls this directly

Calls 3

aliceMethod · 0.80
set_config_boolMethod · 0.80
syncFunction · 0.70

Tested by

no test coverage detected