Files
Arun Raj M d634fdeac3 feat: change async-bb8 fork and tokio spawn for concurrent database calls (#2774)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: akshay-97 <adiosphobian@gmail.com>
Co-authored-by: akshay.s <akshay.s@juspay.in>
Co-authored-by: Kartikeya Hegde <karthikey.hegde@juspay.in>
2023-11-16 04:57:34 +00:00

37 lines
1.1 KiB
Rust

#![allow(clippy::unwrap_used)]
mod utils;
#[actix_web::test]
async fn payouts_todo() {
Box::pin(utils::setup()).await;
let client = awc::Client::default();
let mut response;
let mut response_body;
let get_endpoints = vec!["retrieve", "accounts"];
let post_endpoints = vec!["create", "update", "reverse", "cancel"];
for endpoint in get_endpoints {
response = client
.get(format!("http://127.0.0.1:8080/payouts/{endpoint}"))
.send()
.await
.unwrap();
response_body = response.body().await;
println!("{endpoint} =:= {response:?} : {response_body:?}");
assert_eq!(response.status(), awc::http::StatusCode::OK);
}
for endpoint in post_endpoints {
response = client
.post(format!("http://127.0.0.1:8080/payouts/{endpoint}"))
.send()
.await
.unwrap();
response_body = response.body().await;
println!("{endpoint} =:= {response:?} : {response_body:?}");
assert_eq!(response.status(), awc::http::StatusCode::OK);
}
}