diff options
author | Sergey Pashinin <sergey@pashinin.com> | 2021-11-11 12:55:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 10:55:09 +0100 |
commit | a8503e0fa2d6065b1c471becf76dde68571b7984 (patch) | |
tree | e893f04e6e5e01397ff675a2779515a621acd2a6 /askama_actix/tests/basic.rs | |
parent | cfe83bcb73b9e0cfd8a2d3151e4cab38327eabea (diff) | |
download | askama-a8503e0fa2d6065b1c471becf76dde68571b7984.tar.gz askama-a8503e0fa2d6065b1c471becf76dde68571b7984.tar.bz2 askama-a8503e0fa2d6065b1c471becf76dde68571b7984.zip |
Prepare for actix-web v4 (#553)
Diffstat (limited to '')
-rw-r--r-- | askama_actix/tests/basic.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/askama_actix/tests/basic.rs b/askama_actix/tests/basic.rs index 125270f..070cbf6 100644 --- a/askama_actix/tests/basic.rs +++ b/askama_actix/tests/basic.rs @@ -1,5 +1,4 @@ use actix_web::http::header::CONTENT_TYPE; -use actix_web::test; use actix_web::web; use askama_actix::{Template, TemplateToResponse}; use bytes::Bytes; @@ -12,7 +11,7 @@ struct HelloTemplate<'a> { #[actix_rt::test] async fn test_actix_web() { - let srv = test::start(|| { + let srv = actix_test::start(|| { actix_web::App::new() .service(web::resource("/").to(|| async { HelloTemplate { name: "world" } })) }); @@ -31,10 +30,10 @@ async fn test_actix_web() { #[actix_rt::test] async fn test_actix_web_responder() { - let srv = test::start(|| { + let srv = actix_test::start(|| { actix_web::App::new().service(web::resource("/").to(|| async { let name = "world".to_owned(); - HelloTemplate { name: &name }.to_response() + HelloTemplate { name: &name }.to_response().await })) }); |