From e49cbbf93b2ad5bed193568a7dd27723452fc714 Mon Sep 17 00:00:00 2001 From: ChristianVisintin Date: Sat, 28 Nov 2020 12:13:47 +0100 Subject: [PATCH] Fixed host tests --- src/host/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/host/mod.rs b/src/host/mod.rs index 9a60873..4d2b325 100644 --- a/src/host/mod.rs +++ b/src/host/mod.rs @@ -641,11 +641,11 @@ mod tests { let mut host: Localhost = Localhost::new(PathBuf::from(tmpdir.path())).ok().unwrap(); let files: Vec = host.list_dir(); assert_eq!(files.len(), 0); // There should be 0 files now - assert!(host.mkdir(String::from("test_dir")).is_ok()); + assert!(host.mkdir(PathBuf::from("test_dir").as_path()).is_ok()); let files: Vec = host.list_dir(); assert_eq!(files.len(), 1); // There should be 1 file now // Try to re-create directory - assert!(host.mkdir(String::from("test_dir")).is_err()) + assert!(host.mkdir(PathBuf::from("test_dir").as_path()).is_err()) } #[test] @@ -663,7 +663,7 @@ mod tests { let files: Vec = host.list_dir(); assert_eq!(files.len(), 0); // There should be 0 files now // Create directory - assert!(host.mkdir(String::from("test_dir")).is_ok()); + assert!(host.mkdir(PathBuf::from("test_dir").as_path()).is_ok()); // Delete directory let files: Vec = host.list_dir(); assert_eq!(files.len(), 1); // There should be 1 file now