1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 15:07:42 +02:00

Update tests

This commit is contained in:
Yuki Okushi
2020-03-08 16:42:45 +09:00
parent a9a475d555
commit e718f65121
12 changed files with 151 additions and 87 deletions

View File

@ -33,7 +33,8 @@ async fn test_h1_v2() {
HttpService::build()
.finish(|_| future::ok::<_, ()>(Response::Ok().body(STR)))
.tcp()
});
})
.await;
let response = srv.get("/").send().await.unwrap();
assert!(response.status().is_success());
@ -61,7 +62,8 @@ async fn test_connection_close() {
.finish(|_| ok::<_, ()>(Response::Ok().body(STR)))
.tcp()
.map(|_| ())
});
})
.await;
let response = srv.get("/").force_close().send().await.unwrap();
assert!(response.status().is_success());
@ -80,7 +82,8 @@ async fn test_with_query_parameter() {
})
.tcp()
.map(|_| ())
});
})
.await;
let request = srv.request(http::Method::GET, srv.url("/?qp=5"));
let response = request.send().await.unwrap();