Made modifications to the test and related code
This commit is contained in:
@@ -90,7 +90,10 @@ pub async fn get_allowed_origins() -> crate::EnvVar {
|
|||||||
let key = crate::keys::ALLOWED_ORIGINS;
|
let key = crate::keys::ALLOWED_ORIGINS;
|
||||||
let value = std::env::var(key).expect(key);
|
let value = std::env::var(key).expect(key);
|
||||||
|
|
||||||
crate::init_envvar(key, &value)
|
let mut envvar = crate::init_envvar(key, &value);
|
||||||
|
crate::init_delimiter(&mut envvar, ',');
|
||||||
|
|
||||||
|
envvar
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get environment not specified in the code
|
/// Get environment not specified in the code
|
||||||
|
@@ -114,7 +114,9 @@ mod tests {
|
|||||||
"{} does not match {:?}",
|
"{} does not match {:?}",
|
||||||
icarus_envy::keys::ALLOWED_ORIGINS,
|
icarus_envy::keys::ALLOWED_ORIGINS,
|
||||||
result
|
result
|
||||||
)
|
);
|
||||||
|
|
||||||
|
assert_eq!(result.has_delimiter, true, "The {} variable has an issue finding the delimiter", result.key)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Reference in New Issue
Block a user