mirror of
https://github.com/chatmail/core.git
synced 2026-04-22 16:06:30 +03:00
Add test
This commit is contained in:
@@ -40,6 +40,23 @@ pub(crate) async fn dummy_context() -> TestContext {
|
||||
test_context().await
|
||||
}
|
||||
|
||||
pub(crate) async fn configured_offline_context() -> TestContext {
|
||||
let t = dummy_context().await;
|
||||
t.ctx
|
||||
.set_config(Config::Addr, Some("alice@example.org"))
|
||||
.await
|
||||
.unwrap();
|
||||
t.ctx
|
||||
.set_config(Config::ConfiguredAddr, Some("alice@example.org"))
|
||||
.await
|
||||
.unwrap();
|
||||
t.ctx
|
||||
.set_config(Config::Configured, Some("1"))
|
||||
.await
|
||||
.unwrap();
|
||||
t
|
||||
}
|
||||
|
||||
/// Load a pre-generated keypair for alice@example.com from disk.
|
||||
///
|
||||
/// This saves CPU cycles by avoiding having to generate a key.
|
||||
|
||||
Reference in New Issue
Block a user