()
| 363 | |
| 364 | #[tokio::test] |
| 365 | async fn test_proxy_error_into_response_method_not_allowed() { |
| 366 | let err = ProxyError::MethodNotAllowed("TRACE".to_string()); |
| 367 | let resp = err.into_response(); |
| 368 | assert_eq!(resp.status(), StatusCode::METHOD_NOT_ALLOWED); |
| 369 | let body = resp.into_body().collect().await.unwrap().to_bytes(); |
| 370 | let json: serde_json::Value = serde_json::from_slice(&body).unwrap(); |
| 371 | assert!(json["error"].as_str().unwrap().contains("TRACE")); |
| 372 | } |
| 373 | |
| 374 | #[test] |
| 375 | fn test_filter_hop_by_hop_headers() { |
nothing calls this directly
no test coverage detected