mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	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>
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			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);
 | |
|     }
 | |
| }
 |