From 966eb6d045f92370131e0c338fa6d6b89b66ad0f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 12 Oct 2019 16:46:52 +0200 Subject: [PATCH] Add test: check whether imag-init creates store path Signed-off-by: Matthias Beyer --- tests/ui/src/imag_init.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/ui/src/imag_init.rs b/tests/ui/src/imag_init.rs index 0c3c6cab..2ef6aec3 100644 --- a/tests/ui/src/imag_init.rs +++ b/tests/ui/src/imag_init.rs @@ -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"); +} +