mirror of
https://github.com/chatmail/core.git
synced 2026-05-13 03:46:32 +03:00
Introduce TestContextBuilder
There are too many ways to create a TestContext, this introduces a TestContextBuilder to try and keep this shorter. It also cleans up the existing constructors keeping only the commonly used ones.
This commit is contained in:
@@ -1525,9 +1525,9 @@ mod tests {
|
||||
let t = TestContext::new().await;
|
||||
assert_eq!(t.is_self_addr("me@me.org").await?, false);
|
||||
|
||||
let addr = t.configure_alice().await;
|
||||
t.configure_addr("you@you.net").await;
|
||||
assert_eq!(t.is_self_addr("me@me.org").await?, false);
|
||||
assert_eq!(t.is_self_addr(&addr).await?, true);
|
||||
assert_eq!(t.is_self_addr("you@you.net").await?, true);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user