mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 15:07:42 +02:00
migrate integration testing to new crate (#2112)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
use actix_web::{Responder, HttpResponse, App, test};
|
||||
use actix_web::{Responder, HttpResponse, App};
|
||||
use actix_web_codegen::*;
|
||||
|
||||
/// Docstrings shouldn't break anything.
|
||||
/// doc comments shouldn't break anything
|
||||
#[get("/")]
|
||||
async fn index() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
@ -9,7 +9,7 @@ async fn index() -> impl Responder {
|
||||
|
||||
#[actix_web::main]
|
||||
async fn main() {
|
||||
let srv = test::start(|| App::new().service(index));
|
||||
let srv = actix_test::start(|| App::new().service(index));
|
||||
|
||||
let request = srv.get("/");
|
||||
let response = request.send().await.unwrap();
|
||||
|
Reference in New Issue
Block a user