1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-29 16:19:19 +02:00

enable runtime for test:: methods

This commit is contained in:
Nikolay Kim
2019-04-17 10:28:27 -07:00
parent cc8420377e
commit b64851c5ec
3 changed files with 31 additions and 42 deletions

View File

@@ -307,11 +307,11 @@ pub(crate) mod tests {
);
let req = TestRequest::with_uri("/none").to_request();
let resp = TestRequest::block_on(srv.call(req)).unwrap();
let resp = block_on(srv.call(req)).unwrap();
assert_eq!(resp.status(), StatusCode::NOT_FOUND);
let req = TestRequest::with_uri("/some").to_request();
let resp = TestRequest::block_on(srv.call(req)).unwrap();
let resp = block_on(srv.call(req)).unwrap();
assert_eq!(resp.status(), StatusCode::OK);
match resp.response().body() {
ResponseBody::Body(Body::Bytes(ref b)) => {