Skip to content

Commit 845534f

Browse files
committed
chore(actix-http): more tests should use proper method
1 parent 605bcd1 commit 845534f

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

actix-http/tests/test_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ async fn h1_expect() {
139139

140140
// test expect would fail to continue
141141
let request = srv
142-
.request(http::Method::GET, srv.url("/"))
142+
.request(http::Method::POST, srv.url("/"))
143143
.insert_header(("Expect", "100-continue"));
144144

145145
let response = request.send_body("expect body").await.unwrap();
146146
assert_eq!(response.status(), StatusCode::EXPECTATION_FAILED);
147147

148148
// test expect would continue
149149
let request = srv
150-
.request(http::Method::GET, srv.url("/"))
150+
.request(http::Method::POST, srv.url("/"))
151151
.insert_header(("Expect", "100-continue"))
152152
.insert_header(("AUTH", "996"));
153153

actix-http/tests/test_openssl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async fn h2_body() -> io::Result<()> {
118118
})
119119
.await;
120120

121-
let response = srv.sget("/").send_body(data.clone()).await.unwrap();
121+
let response = srv.spost("/").send_body(data.clone()).await.unwrap();
122122
assert!(response.status().is_success());
123123

124124
let body = srv.load_body(response).await.unwrap();

actix-http/tests/test_rustls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ async fn h2_body1() -> io::Result<()> {
184184
})
185185
.await;
186186

187-
let response = srv.sget("/").send_body(data.clone()).await.unwrap();
187+
let response = srv.spost("/").send_body(data.clone()).await.unwrap();
188188
assert!(response.status().is_success());
189189

190190
let body = srv.load_body(response).await.unwrap();

awc/tests/test_client.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ async fn json() {
6666
.insert_header(("x-test", "111"))
6767
.send_json(&"TEST".to_string());
6868
let response = request.await.unwrap();
69-
println!("{response:?}");
7069
assert!(response.status().is_success());
7170
}
7271

0 commit comments

Comments
 (0)