From 136c348f0170ad597c79eef0a875835a6b21eb5b Mon Sep 17 00:00:00 2001 From: Adrian Heine Date: Fri, 29 Nov 2024 08:21:57 +0100 Subject: [PATCH] Update tests --- src/symbols/user.rs | 2 ++ tests/setup.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/symbols/user.rs b/src/symbols/user.rs index c32bec3..4c76058 100644 --- a/src/symbols/user.rs +++ b/src/symbols/user.rs @@ -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); } diff --git a/tests/setup.rs b/tests/setup.rs index 1603f86..2b2e856 100644 --- a/tests/setup.rs +++ b/tests/setup.rs @@ -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"); }