From 52b2a4589d99b26d22860806614b354534071b8d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 19 Sep 2016 11:01:56 +0200 Subject: [PATCH] Add test to get non-existent entries --- libimagstore/src/store.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index e8efd29c..668e7d0d 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -2273,5 +2273,16 @@ mod store_tests { } } + #[test] + fn test_get_none() { + let store = get_store(); + + for n in 1..100 { + match store.get(PathBuf::from(format!("test-{}", n))) { + Ok(None) => assert!(true), + _ => assert!(false), + } + } + } }