Add test: store is empty after creation
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
eb6029537a
commit
4c67450b0c
1 changed files with 14 additions and 0 deletions
|
@ -94,3 +94,17 @@ fn test_init_creates_store_directory() {
|
|||
assert!(store_path.exists(), "imag store path does not exist");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_init_creates_empty_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_eq!(0, std::fs::read_dir(store_path).unwrap().count(), "imag store directory is not empty after creation");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue