Only test Action::connect in test_action_connect
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
4c326b4ca5
commit
413e1b4560
1 changed files with 3 additions and 24 deletions
27
src/lib.rs
27
src/lib.rs
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue