Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
nkz-soft committed Nov 4, 2024
1 parent a484392 commit d0cc737
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/starter/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mod tests {
#[tokio::test]
async fn start_server_and_test() {
let client = prepare_test_environment!();
assert!(client.get("http://127.0.0.1:8181").send().await.is_ok());
assert!(client.get("http://localhost:8181").send().await.is_ok());
}

#[serial]
Expand All @@ -24,7 +24,7 @@ mod tests {

// Act
let response = client
.get("http://127.0.0.1:8181/to-do-items")
.get("http://localhost:8181/to-do-items")
.send()
.await
.expect("Failed to execute request.");
Expand All @@ -43,7 +43,7 @@ mod tests {

// Act
let id = client
.post("http://127.0.0.1:8181/to-do-items")
.post("http://localhost:8181/to-do-items")
.json(&map_create)
.send()
.await
Expand All @@ -53,7 +53,7 @@ mod tests {
.expect("Failed to deserialize response.");

let response = client
.get(format!("http://127.0.0.1:8181/to-do-items/{id}", id = id))
.get(format!("http://localhost:8181/to-do-items/{id}", id = id))
.send()
.await
.expect("Failed to execute request.");
Expand All @@ -72,7 +72,7 @@ mod tests {

// Act
let response = client
.post("http://127.0.0.1:8181/to-do-items")
.post("http://localhost:8181/to-do-items")
.json(&map)
.send()
.await
Expand All @@ -92,7 +92,7 @@ mod tests {

// Act
let id = client
.post("http://127.0.0.1:8181/to-do-items")
.post("http://localhost:8181/to-do-items")
.json(&map_create)
.send()
.await
Expand All @@ -107,7 +107,7 @@ mod tests {
map_update.insert("note", String::from("note1"));

let response = client
.put("http://127.0.0.1:8181/to-do-items")
.put("http://localhost:8181/to-do-items")
.json(&map_update)
.send()
.await
Expand All @@ -127,7 +127,7 @@ mod tests {

// Act
let id = client
.post("http://127.0.0.1:8181/to-do-items")
.post("http://localhost:8181/to-do-items")
.json(&map_create)
.send()
.await
Expand All @@ -137,7 +137,7 @@ mod tests {
.expect("Failed to deserialize response.");

let response = client
.delete(format!("http://127.0.0.1:8181/to-do-items/{id}", id = id))
.delete(format!("http://localhost:8181/to-do-items/{id}", id = id))
.send()
.await
.expect("Failed to execute request.");
Expand Down

0 comments on commit d0cc737

Please sign in to comment.