This commit is contained in:
Simon Laux
2020-01-07 02:25:27 +01:00
parent 1144a536a5
commit d11d3ab08b

View File

@@ -2398,7 +2398,7 @@ mod tests {
let chat = Chat::load_from_db(&t.ctx, chat_id).unwrap(); let chat = Chat::load_from_db(&t.ctx, chat_id).unwrap();
let info = chat.get_info(&t.ctx).unwrap(); let info = chat.get_info(&t.ctx).unwrap();
// Ensure we can serialise this. // Ensure we can serialize this.
println!("{}", serde_json::to_string_pretty(&info).unwrap()); println!("{}", serde_json::to_string_pretty(&info).unwrap());
let expected = r#" let expected = r#"
@@ -2417,7 +2417,7 @@ mod tests {
} }
"#; "#;
// Ensure we can deserialise this. // Ensure we can deserialize this.
let loaded: ChatInfo = serde_json::from_str(expected).unwrap(); let loaded: ChatInfo = serde_json::from_str(expected).unwrap();
assert_eq!(info, loaded); assert_eq!(info, loaded);
} }