feat: add "theme" to Icon (#766)
* feat: add theme field to Icon * fix: update IconThem crates/rmcp/src/model.rs (non_exhaustive) Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com> * fix: update IconThem crates/rmcp/src/model.rs (eq, hash) Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com> * fix: update docs with full descriptions of theme from mcp spec --------- Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com>
This commit is contained in:
parent
6a3b32d3ab
commit
0b36a84f05
1 changed files with 140 additions and 0 deletions
|
|
@ -217,6 +217,7 @@ mod tests {
|
|||
use serde_json;
|
||||
|
||||
use super::*;
|
||||
use crate::model::IconTheme;
|
||||
|
||||
#[test]
|
||||
fn test_resource_serialization() {
|
||||
|
|
@ -268,6 +269,7 @@ mod tests {
|
|||
src: "https://example.com/icon.png".to_string(),
|
||||
mime_type: Some("image/png".to_string()),
|
||||
sizes: Some(vec!["48x48".to_string()]),
|
||||
theme: Some(IconTheme::Light),
|
||||
}]),
|
||||
};
|
||||
|
||||
|
|
@ -275,6 +277,7 @@ mod tests {
|
|||
assert!(json["icons"].is_array());
|
||||
assert_eq!(json["icons"][0]["src"], "https://example.com/icon.png");
|
||||
assert_eq!(json["icons"][0]["sizes"][0], "48x48");
|
||||
assert_eq!(json["icons"][0]["theme"], "light");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue