Skip to content

Commit

Permalink
Upgrade reqwest dependency to version 0.12
Browse files Browse the repository at this point in the history
- fix tests
- update test assertions for IP details to reflect new expected values for city, region, location, postal code, and timezone.
  • Loading branch information
aalkhodiry committed Dec 17, 2024
1 parent f5e48ab commit 4b2505e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ travis-ci = { repository = "ipinfo/rust", branch = "master" }
codecov = { repository = "ipinfo/rust", branch = "master", service = "github" }

[dependencies]
reqwest = { version = "0.11", features = ["json"], default-features = false }
reqwest = { version = "0.12", features = ["json"], default-features = false }
lru = "0.12.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
10 changes: 5 additions & 5 deletions src/ipinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,12 +584,12 @@ mod tests {
let ip4 = &details["4.2.2.4"];
assert_eq!(ip4.ip, "4.2.2.4");
assert_eq!(ip4.hostname, Some("d.resolvers.level3.net".to_owned()));
assert_eq!(ip4.city, "Monroe");
assert_eq!(ip4.region, "Louisiana");
assert_eq!(ip4.city, "Broomfield");
assert_eq!(ip4.region, "Colorado");
assert_eq!(ip4.country, "US");
assert_eq!(ip4.loc, "32.5530,-92.0422");
assert_eq!(ip4.postal, Some("71203".to_owned()));
assert_eq!(ip4.timezone, Some("America/Chicago".to_owned()));
assert_eq!(ip4.loc, "39.8854,-105.1139");
assert_eq!(ip4.postal, Some("80021".to_owned()));
assert_eq!(ip4.timezone, Some("America/Denver".to_owned()));
}

#[tokio::test]
Expand Down

0 comments on commit 4b2505e

Please sign in to comment.