Lines
100 %
Functions
Branches
use web::Config;
#[test]
fn test_config_structure() {
let config = Config {
site_url: "http://localhost:3000".to_string(),
redis_url: "redis://localhost:6379".to_string(),
client_origin: "http://localhost:3000".to_string(),
access_token_private_key: "private_key".to_string(),
access_token_public_key: "public_key".to_string(),
access_token_expires_in: "15m".to_string(),
access_token_max_age: 15,
refresh_token_private_key: "refresh_private_key".to_string(),
refresh_token_public_key: "refresh_public_key".to_string(),
refresh_token_expires_in: "60m".to_string(),
refresh_token_max_age: 60,
};
assert_eq!(config.site_url, "http://localhost:3000");
assert_eq!(config.redis_url, "redis://localhost:6379");
assert_eq!(config.access_token_max_age, 15);
assert_eq!(config.refresh_token_max_age, 60);
}