()
| 447 | |
| 448 | #[test] |
| 449 | fn unknown_field_errors() { |
| 450 | let schema = test_schema(); |
| 451 | let mut map = std::collections::HashMap::new(); |
| 452 | map.insert("id".into(), Value::String("u4".into())); |
| 453 | map.insert("name".into(), Value::String("Eve".into())); |
| 454 | map.insert("extra".into(), Value::String("boom".into())); |
| 455 | |
| 456 | let result = super::super::encode::value_to_binary_tuple(&Value::Object(map), &schema); |
| 457 | assert!(result.is_err()); |
| 458 | assert!( |
| 459 | result |
| 460 | .unwrap_err() |
| 461 | .to_string() |
| 462 | .contains("unknown field 'extra'") |
| 463 | ); |
| 464 | } |
| 465 | } |
nothing calls this directly
no test coverage detected