()
| 257 | |
| 258 | #[test] |
| 259 | fn test_multiple_patterns_validation() { |
| 260 | let parameters = vec![ |
| 261 | create_parameter_with_pattern("email", Some(EMAIL_PATTERN.to_string()), true), |
| 262 | create_parameter_with_pattern("phone", Some(PHONE_PATTERN.to_string()), false), |
| 263 | ]; |
| 264 | let openapi = create_openapi_with_parameters(parameters); |
| 265 | |
| 266 | test_query_validation( |
| 267 | &openapi, |
| 268 | &[("email", "test@example.com"), ("phone", "(555) 123-4567")], |
| 269 | true, |
| 270 | ); |
| 271 | |
| 272 | test_query_validation( |
| 273 | &openapi, |
| 274 | &[("email", "test@example.com"), ("phone", "invalid-phone")], |
| 275 | false, |
| 276 | ); |
| 277 | |
| 278 | test_query_validation(&openapi, &[("email", "test@example.com")], true); |
| 279 | |
| 280 | test_query_validation(&openapi, &[("email", "invalid-email")], false); |
| 281 | } |
| 282 | |
| 283 | #[test] |
| 284 | fn test_invalid_regex_pattern() { |
nothing calls this directly
no test coverage detected