1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-09-21 02:50:10 +00:00
actix-web/actix-web-codegen/tests/trybuild/route-missing-method-fail.rs

16 lines
320 B
Rust
Raw Normal View History

use actix_web::*;
#[route("/")]
async fn index() -> impl Responder {
HttpResponse::Ok()
}
#[actix_web::main]
async fn main() {
let srv = test::start(|| App::new().service(index));
let request = srv.get("/");
let response = request.send().await.unwrap();
assert!(response.status().is_success());
}