mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 18:06:35 +03:00
unify events
This commit is contained in:
@@ -27,9 +27,14 @@ impl TestContext {
|
||||
///
|
||||
/// [Context]: crate::context::Context
|
||||
pub async fn new() -> Self {
|
||||
use rand::Rng;
|
||||
|
||||
let dir = tempdir().unwrap();
|
||||
let dbfile = dir.path().join("db.sqlite");
|
||||
let ctx = Context::new("FakeOS".into(), dbfile.into()).await.unwrap();
|
||||
let id = rand::thread_rng().gen();
|
||||
let ctx = Context::new("FakeOS".into(), dbfile.into(), id)
|
||||
.await
|
||||
.unwrap();
|
||||
Self { ctx, dir }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user