This commit is contained in:
Hocuri
2020-06-08 21:14:50 +02:00
committed by holger krekel
parent acb42982b7
commit 84be82c670
4 changed files with 82 additions and 50 deletions

View File

@@ -1780,7 +1780,7 @@ mod tests {
use crate::chat::ChatVisibility;
use crate::chatlist::Chatlist;
use crate::message::Message;
use crate::test_utils::{dummy_context, TestContext};
use crate::test_utils::{configured_offline_context, dummy_context};
#[test]
fn test_hex_hash() {
@@ -1876,23 +1876,6 @@ mod tests {
assert!(!is_msgrmsg_rfc724_mid(&t.ctx, "nonexistant@message.id").await);
}
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
}
static MSGRMSG: &[u8] = b"From: Bob <bob@example.org>\n\
To: alice@example.org\n\
Chat-Version: 1.0\n\