From 333fe17bf8d0c70e37b1bed59c129cbb3abaccca Mon Sep 17 00:00:00 2001 From: 0xripleys <0xripleys@solend.fi> Date: Thu, 26 Sep 2024 15:56:56 +0800 Subject: [PATCH] check state --- token-lending/program/tests/donate_to_reserve.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/token-lending/program/tests/donate_to_reserve.rs b/token-lending/program/tests/donate_to_reserve.rs index 314dc768071..6542f3b4f89 100644 --- a/token-lending/program/tests/donate_to_reserve.rs +++ b/token-lending/program/tests/donate_to_reserve.rs @@ -13,6 +13,7 @@ mod helpers; use helpers::*; use solana_program_test::*; +use solend_sdk::state::Reserve; use std::collections::HashSet; @@ -53,6 +54,12 @@ async fn test_donate_to_reserve() { .await .unwrap(); + let reserve_post = test + .load_account::(reserves[0].pubkey) + .await; + + assert_eq!(reserve_post.account.liquidity.available_amount, 200_000 * FRACTIONAL_TO_USDC); + let (balance_changes, _) = balance_checker.find_balance_changes(&mut test).await; let expected_balance_changes = HashSet::from([ TokenBalanceChange {