Add test: check whether imag-init creates store path

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-10-12 16:46:52 +02:00
parent 409660b07b
commit 966eb6d045

View file

@ -79,3 +79,18 @@ fn test_init_creates_default_config() {
assert_eq!(orig, created);
});
}
#[test]
fn test_init_creates_store_directory() {
crate::setup_logging();
let imag_home = crate::imag::make_temphome();
call(&imag_home);
let store_path = {
let mut path = imag_home.path().to_path_buf();
path.push("store");
path
};
assert!(store_path.exists(), "imag store path does not exist");
}