summaryrefslogtreecommitdiffstats
path: root/tests/get.rs
diff options
context:
space:
mode:
authorRyan Leckey <leckey.ryan@gmail.com>2017-07-30 13:20:36 -0700
committerRyan Leckey <leckey.ryan@gmail.com>2017-07-30 13:20:36 -0700
commit14224be23dc2f253a240b85214927d97e1160669 (patch)
tree6f5b02b26aef5cf37bb14f32b9048165b67109ce /tests/get.rs
parent71f4b182d1e56febda64bd620ae0e0f65de333cd (diff)
Remove ConfigResult; close #36
Diffstat (limited to 'tests/get.rs')
-rw-r--r--tests/get.rs22
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/get.rs b/tests/get.rs
index 1922fca..995f73c 100644
--- a/tests/get.rs
+++ b/tests/get.rs
@@ -41,9 +41,10 @@ fn test_not_found() {
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());
+ assert_eq!(
+ res.unwrap_err().to_string(),
+ "configuration property \"not_found\" not found".to_string()
+ );
}
#[test]
@@ -84,7 +85,10 @@ fn test_get_scalar_path() {
let c = make();
assert_eq!(c.get("place.favorite").ok(), Some(false));
- assert_eq!(c.get("place.creator.name").ok(), Some("John Smith".to_string()));
+ assert_eq!(
+ c.get("place.creator.name").ok(),
+ Some("John Smith".to_string())
+ );
}
#[test]
@@ -104,7 +108,10 @@ fn test_map() {
let m: HashMap<String, Value> = c.get("place").unwrap();
assert_eq!(m.len(), 7);
- assert_eq!(m["name"].clone().into_str().unwrap(), "Torre di Pisa".to_string());
+ assert_eq!(
+ m["name"].clone().into_str().unwrap(),
+ "Torre di Pisa".to_string()
+ );
assert_eq!(m["reviews"].clone().into_int().unwrap(), 3866);
}
@@ -128,7 +135,10 @@ fn test_map_struct() {
let s: Settings = c.deserialize().unwrap();
assert_eq!(s.place.len(), 7);
- assert_eq!(s.place["name"].clone().into_str().unwrap(), "Torre di Pisa".to_string());
+ assert_eq!(
+ s.place["name"].clone().into_str().unwrap(),
+ "Torre di Pisa".to_string()
+ );
assert_eq!(s.place["reviews"].clone().into_int().unwrap(), 3866);
}