Fix system theme pair integration

This commit is contained in:
Yuri Karamian
2026-08-06 15:12:43 +02:00
parent aeddcc6e58
commit 1950c4cc3c
8 changed files with 73 additions and 52 deletions
+14 -1
View File
@@ -505,7 +505,7 @@ pub struct TaskItem {
#[cfg(test)]
mod startup_view_tests {
use super::StartupView;
use super::{AppConfig, StartupView};
#[test]
fn serializes_supported_startup_views() {
@@ -526,4 +526,17 @@ mod startup_view_tests {
StartupView::All
);
}
#[test]
fn existing_configs_default_system_theme_pair() {
let mut value = serde_json::to_value(AppConfig::default()).unwrap();
let object = value.as_object_mut().unwrap();
object.remove("system_light_theme");
object.remove("system_dark_theme");
let config: AppConfig = serde_json::from_value(value).unwrap();
assert_eq!(config.system_light_theme, "light");
assert_eq!(config.system_dark_theme, "dark");
}
}