()
| 291 | |
| 292 | #[test] |
| 293 | fn test_invalid_schema() { |
| 294 | let validator = TypeValidator::new(); |
| 295 | let invalid_schema = serde_json::Value::String("not an object".to_string()); |
| 296 | |
| 297 | let result = validator.validate_against_schema("\"test\"", &invalid_schema); |
| 298 | assert!(!result.is_valid); |
| 299 | assert!(result |
| 300 | .errors |
| 301 | .iter() |
| 302 | .any(|e| e.error_code == "INVALID_SCHEMA")); |
| 303 | } |
| 304 | |
| 305 | // Mock custom validator for testing |
| 306 | struct MockValidator { |
nothing calls this directly
no test coverage detected