mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-21 14:46:32 +01:00
axum: Add content-length
header assertions to middleware_adding_body
test (#3033)
This commit is contained in:
parent
17016d6dd6
commit
9ec18b9a5d
1 changed files with 6 additions and 0 deletions
|
@ -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, "…");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue