mirror of
https://github.com/darwincereska/envkit.git
synced 2026-06-11 10:23:23 -05:00
20 lines
561 B
Rust
20 lines
561 B
Rust
#[cfg(test)]
|
|
mod test_errors {
|
|
use envkit::error::EnvError;
|
|
|
|
#[test]
|
|
/// Tests for the `missing` function.
|
|
fn test_missing_var() {
|
|
assert_eq!(EnvError::missing("missing test"), EnvError::MissingVar("missing test".to_string()));
|
|
}
|
|
|
|
#[test]
|
|
/// Tests for the `invalid` function.
|
|
fn test_invalid() {
|
|
assert_eq!(EnvError::invalid("key", "value", "message"), EnvError::Invalid {
|
|
key: "key".to_string(),
|
|
value: "value".to_string(),
|
|
message: "message".to_string(),
|
|
});
|
|
}
|
|
} |