summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Leckey <ryan@launchbadge.com>2017-06-13 23:40:50 -0700
committerRyan Leckey <ryan@launchbadge.com>2017-06-13 23:40:50 -0700
commit04ad01390f68e7cc83de513e93fac18817801dbe (patch)
tree734ec8cf1fa729dfcb75069cee82f897fc93ff17
parent01583791f785e2883dc19b92c8c97b5fd31af0b6 (diff)
Add test for a missing key
-rw-r--r--tests/get.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/get.rs b/tests/get.rs
index 1c98643..2df50a5 100644
--- a/tests/get.rs
+++ b/tests/get.rs
@@ -36,6 +36,17 @@ fn make() -> Config {
}
#[test]
+fn test_not_found() {
+ let c = make();
+ let res = c.get::<bool>("not_found");
+
+ assert!(res.is_err());
+ assert_eq!(res.unwrap_err().to_string(),
+ "configuration property \"not_found\" not found"
+ .to_string());
+}
+
+#[test]
fn test_scalar() {
let c = make();