summaryrefslogtreecommitdiff
path: root/learn_21/tests
diff options
context:
space:
mode:
Diffstat (limited to 'learn_21/tests')
-rw-r--r--learn_21/tests/load_config.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/learn_21/tests/load_config.rs b/learn_21/tests/load_config.rs
index 5fc7866..35bc8a0 100644
--- a/learn_21/tests/load_config.rs
+++ b/learn_21/tests/load_config.rs
@@ -18,9 +18,11 @@ fn test_load_config() -> io::Result<()> {
assert!(load_config(&file_path).is_ok_and(|x| x ==
Config{host:"myhost".to_string(), port:1, workers:1}));
+
assert!(matches!(
load_config(std::path::Path::new("/bad/path")),
- Err(ConfigError::Io(Error)),
+ Err(ConfigError::Io(err))
+ if err.kind() == std::io::ErrorKind::NotFound
));
fs::remove_file(&file_path)?;