mirror of https://github.com/fafhrd91/actix-web
chore(actix-http): more tests should use proper method
This commit is contained in:
parent
605bcd18c6
commit
845534fc81
|
@ -139,7 +139,7 @@ async fn h1_expect() {
|
|||
|
||||
// test expect would fail to continue
|
||||
let request = srv
|
||||
.request(http::Method::GET, srv.url("/"))
|
||||
.request(http::Method::POST, srv.url("/"))
|
||||
.insert_header(("Expect", "100-continue"));
|
||||
|
||||
let response = request.send_body("expect body").await.unwrap();
|
||||
|
@ -147,7 +147,7 @@ async fn h1_expect() {
|
|||
|
||||
// test expect would continue
|
||||
let request = srv
|
||||
.request(http::Method::GET, srv.url("/"))
|
||||
.request(http::Method::POST, srv.url("/"))
|
||||
.insert_header(("Expect", "100-continue"))
|
||||
.insert_header(("AUTH", "996"));
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ async fn h2_body() -> io::Result<()> {
|
|||
})
|
||||
.await;
|
||||
|
||||
let response = srv.sget("/").send_body(data.clone()).await.unwrap();
|
||||
let response = srv.spost("/").send_body(data.clone()).await.unwrap();
|
||||
assert!(response.status().is_success());
|
||||
|
||||
let body = srv.load_body(response).await.unwrap();
|
||||
|
|
|
@ -184,7 +184,7 @@ async fn h2_body1() -> io::Result<()> {
|
|||
})
|
||||
.await;
|
||||
|
||||
let response = srv.sget("/").send_body(data.clone()).await.unwrap();
|
||||
let response = srv.spost("/").send_body(data.clone()).await.unwrap();
|
||||
assert!(response.status().is_success());
|
||||
|
||||
let body = srv.load_body(response).await.unwrap();
|
||||
|
|
|
@ -66,7 +66,6 @@ async fn json() {
|
|||
.insert_header(("x-test", "111"))
|
||||
.send_json(&"TEST".to_string());
|
||||
let response = request.await.unwrap();
|
||||
println!("{response:?}");
|
||||
assert!(response.status().is_success());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue