use mj::core::*; use std::default::Default; use std::env; use std::fs; use uuid::Uuid; #[test] fn bootstrap_in_empty_folder() { let id = format!("{}", Uuid::new_v4()); let root = env::temp_dir().join(id); assert!(fs::create_dir_all(&root).is_ok()); let vault = Vault::new(&Default::default(), &root); assert_eq!(false, vault.is_bootstrapped()); assert!(vault.bootstrap().is_ok()); assert!(vault.is_bootstrapped()); fs::remove_dir_all(&root) .expect("cannot remove auxiliary files after test run"); }