mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-21 00:00:14 +02:00
axum: Add content-length header assertions to middleware_adding_body test (#3033)
This commit is contained in:
@@ -1091,5 +1091,11 @@ async fn middleware_adding_body() {
|
||||
|
||||
let client = TestClient::new(app);
|
||||
let res = client.get("/").await;
|
||||
|
||||
let headers = res.headers();
|
||||
let header = headers.get("content-length");
|
||||
assert!(header.is_some());
|
||||
assert_eq!(header.unwrap().to_str().unwrap(), "3");
|
||||
|
||||
assert_eq!(res.text().await, "…");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user