chore(actix-http): more tests should use proper method

This commit is contained in:
imgurbot12 2025-07-30 21:20:07 -07:00
parent 605bcd18c6
commit 845534fc81
No known key found for this signature in database
4 changed files with 4 additions and 5 deletions

View File

@ -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"));

View File

@ -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();

View File

@ -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();

View File

@ -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());
}