()
| 9573 | |
| 9574 | #[test] |
| 9575 | fn provider_to_json_omits_empty_config() { |
| 9576 | let provider = Provider { |
| 9577 | metadata: Some(ObjectMeta::default()), |
| 9578 | r#type: "anthropic".to_string(), |
| 9579 | credentials: std::collections::HashMap::new(), |
| 9580 | config: std::collections::HashMap::new(), // Empty config |
| 9581 | credential_expires_at_ms: std::collections::HashMap::new(), |
| 9582 | }; |
| 9583 | |
| 9584 | let json = super::provider_to_json(&provider); |
| 9585 | |
| 9586 | assert!( |
| 9587 | json.get("config_keys").is_none(), |
| 9588 | "empty config_keys should be omitted" |
| 9589 | ); |
| 9590 | } |
| 9591 | |
| 9592 | #[test] |
| 9593 | fn provider_to_json_includes_metadata_fields_when_present() { |
nothing calls this directly
no test coverage detected