()
| 196 | |
| 197 | #[test] |
| 198 | fn parse_error_with_code_and_message() { |
| 199 | let parts = vec![ |
| 200 | "ERROR", |
| 201 | "'INSUFFICIENT_SCOPE'", |
| 202 | "MESSAGE", |
| 203 | "'You cannot access this'", |
| 204 | ]; |
| 205 | let mode = parse_on_deny(&parts).unwrap(); |
| 206 | match mode { |
| 207 | DenyMode::Error(err) => { |
| 208 | assert_eq!(err.code, "INSUFFICIENT_SCOPE"); |
| 209 | assert_eq!(err.message, "You cannot access this"); |
| 210 | assert!(err.detail.is_none()); |
| 211 | } |
| 212 | _ => panic!("expected Error mode"), |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | #[test] |
| 217 | fn parse_error_with_detail() { |
nothing calls this directly
no test coverage detected