Update tests
This commit is contained in:
parent
ff32cda7df
commit
136c348f01
2 changed files with 4 additions and 2 deletions
|
|
@ -74,6 +74,7 @@ mod test {
|
|||
let symbol = User {
|
||||
user_name: "nonexisting",
|
||||
command_runner: StdCommandRunner,
|
||||
home_path: "/home/nonexisting",
|
||||
};
|
||||
assert_eq!(run(symbol.target_reached()).unwrap(), false);
|
||||
}
|
||||
|
|
@ -83,6 +84,7 @@ mod test {
|
|||
let symbol = User {
|
||||
user_name: "root",
|
||||
command_runner: StdCommandRunner,
|
||||
home_path: "/root",
|
||||
};
|
||||
assert_eq!(run(symbol.target_reached()).unwrap(), true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ fn test(
|
|||
#[test]
|
||||
fn can_create_an_acme_user() {
|
||||
let mut result = test(1, |setup| {
|
||||
assert_eq!(&*(run(setup.add(AcmeUser)).unwrap().0).0, "acme");
|
||||
assert_eq!(((run(setup.add(AcmeUser)).unwrap().0).0).0.as_ref(), "acme");
|
||||
});
|
||||
let entry = result
|
||||
.pop()
|
||||
|
|
@ -127,7 +127,7 @@ fn can_create_an_acme_cert() {
|
|||
.pop()
|
||||
.expect("log is empty but should contain one entry");
|
||||
assert_eq!(entry.0, 3, "log entry has wrong level");
|
||||
assert_eq!(entry.1.matches("run_symbol").count(), 19);
|
||||
assert_eq!(entry.1.matches("run_symbol").count(), 18);
|
||||
assert_eq!(result.len(), 0, "log has more than one entry");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue