From d6a09f0bedca9ca35b1aca673408c97862ca73c6 Mon Sep 17 00:00:00 2001 From: edgerunnergit Date: Tue, 31 Jan 2023 08:14:41 +0530 Subject: [PATCH] fixed a test - that should be able to pass --- actix-web-codegen/tests/trybuild/route-custom-method.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/actix-web-codegen/tests/trybuild/route-custom-method.rs b/actix-web-codegen/tests/trybuild/route-custom-method.rs index 1a50e01bc..6cc6af5a8 100644 --- a/actix-web-codegen/tests/trybuild/route-custom-method.rs +++ b/actix-web-codegen/tests/trybuild/route-custom-method.rs @@ -1,4 +1,6 @@ use actix_web_codegen::*; +use actix_web::http::Method; +use std::str::FromStr; #[route("/", method="UNEXPECTED")] async fn index() -> String { @@ -11,7 +13,7 @@ async fn main() { let srv = actix_test::start(|| App::new().service(index)); - let request = srv.get("/"); + let request = srv.request(Method::from_str("UNEXPECTED").unwrap(), srv.url("/")); let response = request.send().await.unwrap(); assert!(response.status().is_success()); }