feat: add selectable icon styles
This commit is contained in:
@@ -96,5 +96,26 @@ 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!(
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user