aboutsummaryrefslogtreecommitdiffstats
path: root/askama_axum/tests
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_axum/tests/basic.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/askama_axum/tests/basic.rs b/askama_axum/tests/basic.rs
index acd53b7..3099dac 100644
--- a/askama_axum/tests/basic.rs
+++ b/askama_axum/tests/basic.rs
@@ -5,6 +5,7 @@ use axum::{
routing::get,
Router,
};
+use http_body_util::BodyExt;
use tower::util::ServiceExt;
#[derive(Template)]
@@ -30,6 +31,6 @@ async fn template_to_response() {
let headers = res.headers();
assert_eq!(headers["Content-Type"], "text/html; charset=utf-8");
- let body = hyper::body::to_bytes(res.into_body()).await.unwrap();
+ let body = res.into_body().collect().await.unwrap().to_bytes();
assert_eq!(&body[..], b"Hello, world!");
}