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

update to latest actix-net

This commit is contained in:
Nikolay Kim
2019-12-02 17:33:11 +06:00
parent 33574403b5
commit f4c01384ec
33 changed files with 941 additions and 898 deletions

View File

@ -30,7 +30,9 @@ const STR: &str = "Hello World Hello World Hello World Hello World Hello World \
#[actix_rt::test]
async fn test_h1_v2() {
let srv = TestServer::start(move || {
HttpService::build().finish(|_| future::ok::<_, ()>(Response::Ok().body(STR)))
HttpService::build()
.finish(|_| future::ok::<_, ()>(Response::Ok().body(STR)))
.tcp()
});
let response = srv.get("/").send().await.unwrap();
@ -57,6 +59,7 @@ async fn test_connection_close() {
let srv = TestServer::start(move || {
HttpService::build()
.finish(|_| ok::<_, ()>(Response::Ok().body(STR)))
.tcp()
.map(|_| ())
});
@ -75,6 +78,7 @@ async fn test_with_query_parameter() {
ok::<_, ()>(Response::BadRequest().finish())
}
})
.tcp()
.map(|_| ())
});