diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-10 16:09:17 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-10 16:09:17 +0300 |
| commit | 66be0b655fe922867f1eed100a41d67038b6ffd6 (patch) | |
| tree | dd17c7190cce1954bbb772622f875752be573ba5 /src/config | |
| parent | 4f7fcc48d1f760ab6057d0964f009c05b753456a (diff) | |
fix: stop windows installer from rewriting config
refs #1162
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/model.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/config/model.rs b/src/config/model.rs index 8f94b4da..ee97c2c8 100644 --- a/src/config/model.rs +++ b/src/config/model.rs @@ -1116,6 +1116,24 @@ manifest_check = false assert!(!config.update.manifest_check); } + #[cfg(windows)] + #[test] + fn windows_update_config_defaults_to_preview() { + let empty: Config = toml::from_str("").unwrap(); + let without_update_channel: Config = + toml::from_str("[update]\nversion_check = false").unwrap(); + + assert_eq!( + Config::default().update.channel, + UpdateChannelConfig::Preview + ); + assert_eq!(empty.update.channel, UpdateChannelConfig::Preview); + assert_eq!( + without_update_channel.update.channel, + UpdateChannelConfig::Preview + ); + } + #[test] fn terminal_default_shell_defaults_empty_and_parses() { let default_config = Config::default(); |
