Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
warittornc committed Nov 21, 2024
1 parent 181a42c commit cddfaf2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bothan-core/src/manager/crypto_asset_info/price/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ mod tests {
"testusd".to_string(),
Decimal::default(),
vec![],
None,
Some(Decimal::default()),
)],
process_result: None,
post_process_result: None,
Expand Down Expand Up @@ -512,7 +512,7 @@ mod tests {
"testusd".to_string(),
Decimal::new(1000, 0),
vec![],
None,
Some(Decimal::new(1000, 0)),
)];
assert_eq!(res, expected_res);
assert_eq!(source_records, &expected_source_records);
Expand Down Expand Up @@ -581,7 +581,7 @@ mod tests {
);
let res = compute_source_routes(&routes, start, &cache, &mut record);

let expected_value = Some(Decimal::from_str_exact("76.4").unwrap());
let expected_value = Some(Decimal::new(764, 1));
let expected_record = SourceRecord::new(
"test-source".to_string(),
"test".to_string(),
Expand All @@ -592,7 +592,7 @@ mod tests {
OperationRecord::new("C".to_string(), Operation::Subtract, Decimal::from(13)),
OperationRecord::new("D".to_string(), Operation::Add, Decimal::from(89)),
],
None,
expected_value,
);

assert_eq!(res, Ok(expected_value));
Expand Down

0 comments on commit cddfaf2

Please sign in to comment.