1
use web::Config;
2

            
3
#[test]
4
1
fn test_config_structure() {
5
1
    let config = Config {
6
1
        site_url: "http://localhost:3000".to_string(),
7
1
        redis_url: "redis://localhost:6379".to_string(),
8
1
        client_origin: "http://localhost:3000".to_string(),
9
1
        access_token_private_key: "private_key".to_string(),
10
1
        access_token_public_key: "public_key".to_string(),
11
1
        access_token_expires_in: "15m".to_string(),
12
1
        access_token_max_age: 15,
13
1
        refresh_token_private_key: "refresh_private_key".to_string(),
14
1
        refresh_token_public_key: "refresh_public_key".to_string(),
15
1
        refresh_token_expires_in: "60m".to_string(),
16
1
        refresh_token_max_age: 60,
17
1
        ssh: web::config::SshConnectInfo {
18
1
            hostname: "ssh.example.invalid".to_string(),
19
1
            port: 2222,
20
1
            host_fingerprint: "(test)".to_string(),
21
1
        },
22
1
    };
23

            
24
1
    assert_eq!(config.site_url, "http://localhost:3000");
25
1
    assert_eq!(config.redis_url, "redis://localhost:6379");
26
1
    assert_eq!(config.access_token_max_age, 15);
27
1
    assert_eq!(config.refresh_token_max_age, 60);
28
1
}