2021-04-02 09:26:59 +02:00
|
|
|
use actix_web::{Responder, HttpResponse, App};
|
2021-02-24 13:26:56 +01:00
|
|
|
use actix_web_codegen::*;
|
|
|
|
|
2021-04-02 09:26:59 +02:00
|
|
|
/// doc comments shouldn't break anything
|
2021-02-24 13:26:56 +01:00
|
|
|
#[get("/")]
|
|
|
|
async fn index() -> impl Responder {
|
|
|
|
HttpResponse::Ok()
|
|
|
|
}
|
|
|
|
|
|
|
|
#[actix_web::main]
|
|
|
|
async fn main() {
|
2021-04-02 09:26:59 +02:00
|
|
|
let srv = actix_test::start(|| App::new().service(index));
|
2021-02-24 13:26:56 +01:00
|
|
|
|
|
|
|
let request = srv.get("/");
|
|
|
|
let response = request.send().await.unwrap();
|
|
|
|
assert!(response.status().is_success());
|
|
|
|
}
|