From 8345ff8248f20af20e129da56af664951612ff4f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 19 Sep 2016 11:03:38 +0200 Subject: [PATCH] Add test to delete non-existent entries --- libimagstore/src/store.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 668e7d0d..284c9228 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -2284,5 +2284,17 @@ mod store_tests { } } } + + #[test] + fn test_delete_none() { + let store = get_store(); + + for n in 1..100 { + match store.delete(PathBuf::from(format!("test-{}", n))) { + Err(_) => assert!(true), + _ => assert!(false), + } + } + } }