Skip to content

Commit

Permalink
Update to latest Surf alpha in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed Sep 26, 2020
1 parent eaad5b6 commit 1871e60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn hello_world() -> Result<(), http_types::Error> {
let client = task::spawn(async move {
task::sleep(Duration::from_millis(100)).await;
let string = surf::get(format!("http://localhost:{}", port))
.body_string("nori".to_string())
.body("nori".to_string())
.recv_string()
.await
.unwrap();
Expand All @@ -52,7 +52,7 @@ fn echo_server() -> Result<(), http_types::Error> {
let client = task::spawn(async move {
task::sleep(Duration::from_millis(100)).await;
let string = surf::get(format!("http://localhost:{}", port))
.body_string("chashu".to_string())
.body("chashu".to_string())
.recv_string()
.await
.unwrap();
Expand Down Expand Up @@ -88,7 +88,7 @@ fn json() -> Result<(), http_types::Error> {
let client = task::spawn(async move {
task::sleep(Duration::from_millis(100)).await;
let counter: Counter = surf::get(format!("http://localhost:{}", &port))
.body_json(&Counter { count: 0 })?
.body(Body::from_json(&Counter { count: 0 })?)
.recv_json()
.await
.unwrap();
Expand Down

0 comments on commit 1871e60

Please sign in to comment.