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:
Nikolay Kim
2019-03-29 18:51:07 -07:00
parent 3a954298d7
commit 193f8fb2d9
7 changed files with 74 additions and 63 deletions

View File

@ -52,18 +52,18 @@ fn test_h1_v2() {
assert!(response.status().is_success());
let request = srv.get().header("x-test", "111").send();
let mut response = srv.block_on(request).unwrap();
let response = srv.block_on(request).unwrap();
assert!(response.status().is_success());
// read response
let bytes = srv.block_on(load_body(response.take_payload())).unwrap();
let bytes = srv.load_body(response).unwrap();
assert_eq!(bytes, Bytes::from_static(STR.as_ref()));
let mut response = srv.block_on(srv.post().send()).unwrap();
let response = srv.block_on(srv.post().send()).unwrap();
assert!(response.status().is_success());
// read response
let bytes = srv.block_on(load_body(response.take_payload())).unwrap();
let bytes = srv.load_body(response).unwrap();
assert_eq!(bytes, Bytes::from_static(STR.as_ref()));
}