-
-
Save alexliesenfeld/8b6591fd39e1b85b987f0acb0adade71 to your computer and use it in GitHub Desktop.
Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[tokio::test] | |
async fn test_something_async() { | |
let server = httpmock::MockServer::start_async().await; | |
let mock = server.mock_async(|when, then| { | |
when.path("/v1/payment_intents"); | |
then.status(200); | |
}).await; | |
let res = reqwest::get(server.url("/v1/payment_intents")).await.unwrap(); | |
assert_eq!(res.status().as_u16(), 200); | |
mock.assert(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "stripetest" | |
version = "0.1.0" | |
edition = "2021" | |
[dev-dependencies] | |
httpmock = "0.7.0-rc.1" | |
reqwest = "0.11" | |
tokio = { version = "1", features = ["full"] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment