()
| 589 | |
| 590 | #[tokio::test] |
| 591 | async fn content_headers_unset() { |
| 592 | // Drive the implementation by using `hyper::Body` instead of |
| 593 | // of `aws_lambda_events::encodings::Body` |
| 594 | let response = Response::builder() |
| 595 | .body(HyperBody::from("000000".as_bytes())) |
| 596 | .expect("unable to build http::Response"); |
| 597 | let response = response.into_response().await; |
| 598 | let response = LambdaResponse::from_response(&RequestOrigin::ApiGatewayV2, response); |
| 599 | |
| 600 | let json = serde_json::to_string(&response).expect("failed to serialize to json"); |
| 601 | assert_eq!( |
| 602 | json, |
| 603 | r#"{"statusCode":200,"headers":{},"multiValueHeaders":{},"body":"000000","isBase64Encoded":false,"cookies":[]}"# |
| 604 | ) |
| 605 | } |
| 606 | |
| 607 | #[test] |
| 608 | #[cfg(feature = "vpc_lattice")] |
nothing calls this directly
no test coverage detected