Fix tests for new interface

This commit is contained in:
Matthias Beyer 2018-04-26 14:19:08 +02:00
parent f0969db47c
commit 82867f3ff6

View file

@ -139,8 +139,6 @@ mod tests {
let res = store.create_category(category_name); let res = store.create_category(category_name);
assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res)); assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res));
let res = res.unwrap();
assert!(res);
} }
#[test] #[test]
@ -148,11 +146,10 @@ mod tests {
let category_name = "examplecategory"; let category_name = "examplecategory";
let store = get_store(); let store = get_store();
{
let res = store.create_category(category_name); let res = store.create_category(category_name);
assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res)); assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res));
let res = res.unwrap(); }
assert!(res);
let category = store.get(PathBuf::from(format!("category/{}", category_name))); let category = store.get(PathBuf::from(format!("category/{}", category_name)));
@ -167,11 +164,11 @@ mod tests {
let _ = env_logger::try_init(); let _ = env_logger::try_init();
let category_name = "examplecategory"; let category_name = "examplecategory";
let store = get_store(); let store = get_store();
let res = store.create_category(category_name);
{
let res = store.create_category(category_name);
assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res)); assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res));
let res = res.unwrap(); }
assert!(res);
let id = PathBuf::from(format!("category/{}", category_name)); let id = PathBuf::from(format!("category/{}", category_name));
println!("Trying: {:?}", id); println!("Trying: {:?}", id);