use attune::Settings;

#[derive(Clone, Settings)]
struct AppConfig {
    #[setting(default = 8080)]
    port: u16,

    #[setting(default = "system")]
    theme: String,
}

#[test]
fn load_uses_attribute_defaults() {
    let settings = AppConfig::load().unwrap();

    assert_eq!(settings.port().get(), 8080);
    assert_eq!(settings.theme().get(), "system");
    assert_eq!(settings.snapshot().port, 8080);
    assert_eq!(settings.snapshot().theme, "system");
}
