()
| 578 | |
| 579 | #[test] |
| 580 | fn test_multiple_methods() { |
| 581 | let input = r#" |
| 582 | route /api { |
| 583 | get /, post / { |
| 584 | return "hello"; |
| 585 | } |
| 586 | } |
| 587 | "#; |
| 588 | |
| 589 | let mut parser = Parser::new(input); |
| 590 | let result = parser.parse_route(); |
| 591 | // assert!(result.is_ok()); |
| 592 | |
| 593 | let route = result.unwrap(); |
| 594 | let endpoint = &route.endpoints[0]; |
| 595 | assert_eq!(endpoint.path_specs.len(), 2); |
| 596 | assert_eq!(endpoint.path_specs[0].method, HttpMethod::Get); |
| 597 | assert_eq!(endpoint.path_specs[1].method, HttpMethod::Post); |
| 598 | } |
| 599 | |
| 600 | #[test] |
| 601 | fn test_validators() { |
nothing calls this directly
no test coverage detected