generate one autoconfig per email address

This commit is contained in:
Clément DOUIN
2024-01-15 15:27:14 +01:00
parent 1246be8a5b
commit 7eba3a5186
6 changed files with 56 additions and 39 deletions
+3 -1
View File
@@ -191,13 +191,15 @@ mod test {
use crate::{account::config::TomlAccountConfig, config::TomlConfig};
use super::pretty_serialize;
fn assert_eq(config: TomlAccountConfig, expected_toml: &str) {
let config = TomlConfig {
accounts: HashMap::from_iter([("test".into(), config)]),
..Default::default()
};
let toml = super::pretty_serialize(&config).expect("serialize error");
let toml = pretty_serialize(&config).expect("serialize error");
assert_eq!(toml, expected_toml);
let expected_config = toml::from_str(&toml).expect("deserialize error");