Skip to content

Commit

Permalink
test: fix multipart async file knowing length instead of TE
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Oct 29, 2024
1 parent 845301c commit 449f251
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/multipart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,11 @@ async fn async_impl_file_part() {
async move {
assert_eq!(req.method(), "POST");
assert_eq!(req.headers()["content-type"], ct);
assert_eq!(req.headers()["transfer-encoding"], "chunked");

// files know their exact size
assert_eq!(
req.headers()["content-length"],
expected_body.len().to_string()
);
let full = req.collect().await.unwrap().to_bytes();

assert_eq!(full, expected_body.as_bytes());
Expand Down

0 comments on commit 449f251

Please sign in to comment.