1
use web::Config;
2

            
3
#[test]
4
2
fn test_config_structure() {
5
2
    let config = Config {
6
2
        site_url: "http://localhost:3000".to_string(),
7
2
        redis_url: "redis://localhost:6379".to_string(),
8
2
        client_origin: "http://localhost:3000".to_string(),
9
2
        access_token_private_key: "private_key".to_string(),
10
2
        access_token_public_key: "public_key".to_string(),
11
2
        access_token_expires_in: "15m".to_string(),
12
2
        access_token_max_age: 15,
13
2
        refresh_token_private_key: "refresh_private_key".to_string(),
14
2
        refresh_token_public_key: "refresh_public_key".to_string(),
15
2
        refresh_token_expires_in: "60m".to_string(),
16
2
        refresh_token_max_age: 60,
17
2
    };
18

            
19
2
    assert_eq!(config.site_url, "http://localhost:3000");
20
2
    assert_eq!(config.redis_url, "redis://localhost:6379");
21
2
    assert_eq!(config.access_token_max_age, 15);
22
2
    assert_eq!(config.refresh_token_max_age, 60);
23
2
}