Add tests

This commit is contained in:
Matthew Esposito 2023-02-26 14:34:18 -05:00
parent e821d79cf6
commit 446e1967a2
No known key found for this signature in database
1 changed files with 5 additions and 0 deletions

View File

@ -147,3 +147,8 @@ fn test_alt_env_config_precedence() {
write("libreddit.toml", config_to_write).unwrap();
assert_eq!(get_setting("LIBREDDIT_DEFAULT_COMMENT_SORT"), Some("top".into()))
}
#[test]
#[sealed_test(env = [("LIBREDDIT_DEFAULT_SUBSCRIPTIONS", "news+bestof")])]
fn test_default_subscriptions() {
assert_eq!(get_setting("LIBREDDIT_DEFAULT_SUBSCRIPTIONS"), Some("news+bestof".into()));
}