From e1f79dae17c4560d3718592cedd9226b40060f6e Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Tue, 1 Mar 2022 04:30:10 +0000 Subject: [PATCH] fix test --- actix-web-httpauth/src/middleware.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/actix-web-httpauth/src/middleware.rs b/actix-web-httpauth/src/middleware.rs index fd0073007..f3a91c527 100644 --- a/actix-web-httpauth/src/middleware.rs +++ b/actix-web-httpauth/src/middleware.rs @@ -358,7 +358,7 @@ mod tests { assert!(f.is_ok()); } - #[actix_rt::test] + #[actix_web::test] async fn test_middleware_works_with_app() { async fn validator( _req: ServiceRequest, @@ -371,7 +371,7 @@ mod tests { let srv = actix_web::test::init_service( App::new() .wrap(middleware) - .route("/", web::get().to(|| web::HttpResponse::Ok())), + .route("/", web::get().to(HttpResponse::Ok)), ) .await; @@ -383,7 +383,7 @@ mod tests { assert_eq!(resp.status(), StatusCode::UNAUTHORIZED); } - #[actix_rt::test] + #[actix_web::test] async fn test_middleware_works_with_scope() { async fn validator( _req: ServiceRequest, @@ -397,7 +397,7 @@ mod tests { App::new().service( web::scope("/") .wrap(middleware) - .route("/", web::get().to(|| web::HttpResponse::Ok())), + .route("/", web::get().to(HttpResponse::Ok)), ), ) .await;