Skip to content

Commit

Permalink
Moved to single test values for all path tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Luijken committed Sep 10, 2024
1 parent 6e4f01b commit b205fb8
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions stellar_rust_sdk/src/paths/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ mod tests {
use super::{AssetType, IssuedOrNative};
use crate::{horizon_client::HorizonClient, models::*};

const SOURCE_ASSET_TYPE: &str = "native";
const SOURCE_AMOUNT: &str = "100.0000000";
const DESTINATION_ASSET_TYPE: &str = "native";
const DESTINATION_AMOUNT: &str = "100.0000000";

#[tokio::test]
async fn test_find_payment_paths_request() {
use crate::paths::{Asset, PATHS_PATH};
Expand Down Expand Up @@ -200,10 +205,6 @@ mod tests {

let response = horizon_client.get_find_payment_paths(&request).await;

const SOURCE_ASSET_TYPE: &str = "native";
const SOURCE_AMOUNT: &str = "100.0000000";
const DESTINATION_ASSET_TYPE: &str = "native";
const DESTINATION_AMOUNT: &str = "100.0000000";

assert!(response.clone().is_ok());
let binding = response.unwrap();
Expand Down Expand Up @@ -308,11 +309,6 @@ mod tests {
.get_list_strict_receive_payment_paths(&request)
.await;

const SOURCE_ASSET_TYPE: &str = "native";
const SOURCE_AMOUNT: &str = "100.0000000";
const DESTINATION_ASSET_TYPE: &str = "native";
const DESTINATION_AMOUNT: &str = "100.0000000";

assert!(response.clone().is_ok());
let binding = response.unwrap();
let response = &binding.embedded().records()[0];
Expand Down Expand Up @@ -440,11 +436,6 @@ mod tests {
.get_list_strict_send_payment_paths(&request)
.await;

const SOURCE_ASSET_TYPE: &str = "native";
const SOURCE_AMOUNT: &str = "100.0000000";
const DESTINATION_ASSET_TYPE: &str = "native";
const DESTINATION_AMOUNT: &str = "100.0000000";

assert!(response.clone().is_ok());
let binding = response.unwrap();
let response = &binding.embedded().records()[0];
Expand Down

0 comments on commit b205fb8

Please sign in to comment.