@@ -96,31 +96,10 @@ mod tests {
|
||||
"https://gitea.example.com|octo/demo"
|
||||
);
|
||||
assert_eq!(Preferences::default().pull_status, "open");
|
||||
assert_eq!(
|
||||
Preferences::default().icon_style,
|
||||
crate::domain::IconStyle::Outline
|
||||
);
|
||||
assert_eq!(
|
||||
Preferences::default().appearance,
|
||||
crate::domain::AppearanceMode::Auto
|
||||
);
|
||||
assert_eq!(
|
||||
serde_json::from_str::<Preferences>(r#"{"icon_style":"duotone"}"#)
|
||||
.unwrap()
|
||||
.icon_style,
|
||||
crate::domain::IconStyle::Duotone
|
||||
);
|
||||
assert_eq!(
|
||||
serde_json::from_str::<Preferences>(r#"{"icon_style":"future-style"}"#)
|
||||
.unwrap()
|
||||
.icon_style,
|
||||
crate::domain::IconStyle::Outline
|
||||
);
|
||||
assert_eq!(
|
||||
crate::domain::IconStyle::from_index(2),
|
||||
Some(crate::domain::IconStyle::Bold)
|
||||
);
|
||||
assert_eq!(crate::domain::IconStyle::from_index(3), None);
|
||||
assert_eq!(
|
||||
serde_json::from_str::<Preferences>(r#"{"appearance":"dark"}"#)
|
||||
.unwrap()
|
||||
|
||||
Reference in New Issue
Block a user