summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-10-12 17:03:03 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-11-02 18:19:30 +0100
commit4c67450b0c05eec5ce091b11575ad9b422848306 (patch)
treebf20d13dc2cfbc65cf006b1bafab756f6550571d /tests
parenteb6029537abf2c15d9e8be058168e0aab98458a9 (diff)
Add test: store is empty after creation
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/src/imag_init.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/src/imag_init.rs b/tests/ui/src/imag_init.rs
index 2ef6aec3..736546b7 100644
--- a/tests/ui/src/imag_init.rs
+++ b/tests/ui/src/imag_init.rs
@@ -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");
+}
+