|
|
@ -103,12 +103,12 @@ fn empty_storage() { |
|
|
|
);
|
|
|
|
assert!(storage.read_filename().is_err());
|
|
|
|
assert_eq!(
|
|
|
|
storage.read_filename().unwrap_err().description(),
|
|
|
|
storage.read_filename().unwrap_err().to_string(),
|
|
|
|
"entity not found"
|
|
|
|
);
|
|
|
|
assert!(storage.recent_date().is_err());
|
|
|
|
assert_eq!(
|
|
|
|
storage.recent_date().unwrap_err().description(),
|
|
|
|
storage.recent_date().unwrap_err().to_string(),
|
|
|
|
"entity not found"
|
|
|
|
);
|
|
|
|
}
|
|
|
@ -125,14 +125,11 @@ fn empty_storage_for_filename() { |
|
|
|
);
|
|
|
|
assert!(storage.read_filename().is_err());
|
|
|
|
assert_eq!(
|
|
|
|
storage.read_filename().unwrap_err().description(),
|
|
|
|
storage.read_filename().unwrap_err().to_string(),
|
|
|
|
"Not found"
|
|
|
|
);
|
|
|
|
assert!(storage.recent_date().is_err());
|
|
|
|
assert_eq!(
|
|
|
|
storage.recent_date().unwrap_err().description(),
|
|
|
|
"Not found"
|
|
|
|
);
|
|
|
|
assert_eq!(storage.recent_date().unwrap_err().to_string(), "Not found");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
@ -147,12 +144,9 @@ fn bad_file() { |
|
|
|
);
|
|
|
|
assert!(storage.read_filename().is_err());
|
|
|
|
assert_eq!(
|
|
|
|
storage.read_filename().unwrap_err().description(),
|
|
|
|
storage.read_filename().unwrap_err().to_string(),
|
|
|
|
"Not found"
|
|
|
|
);
|
|
|
|
assert!(storage.recent_date().is_err());
|
|
|
|
assert_eq!(
|
|
|
|
storage.recent_date().unwrap_err().description(),
|
|
|
|
"Not found"
|
|
|
|
);
|
|
|
|
assert_eq!(storage.recent_date().unwrap_err().to_string(), "Not found");
|
|
|
|
}
|