Only test Action::connect in test_action_connect

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-01-09 16:59:59 +01:00
parent 4c326b4ca5
commit 413e1b4560
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -275,31 +275,10 @@ mod tests {
#[test]
fn test_action_connect() {
let buf1 = r#"
[Client] louise
jid: louise@localhost
password: password
let buf1 = "louise connects\n";
[Client] rosa
jid: rosa@localhost
password: password
------
louise connects
rosa connects
"#;
let mut accounts: HashMap<AccountName, Account> = HashMap::new();
accounts.insert(String::from("louise"), get_account("louise"));
accounts.insert(String::from("rosa"), get_account("rosa"));
let actions = vec![
Action::Connect(String::from("louise")),
Action::Connect(String::from("rosa")),
];
let spec = Spec { accounts, actions };
assert_eq!(parse_spec(buf1), Ok(spec));
let action = Action::Connect(String::from("louise"));
assert_eq!(parse_connect(buf1).unwrap().1, action);
}
#[test]