From e732478233322863c9af6750f3afb5ba8dba40b2 Mon Sep 17 00:00:00 2001 From: Erwan Or Date: Tue, 25 Jun 2024 19:17:15 -0400 Subject: [PATCH] app(cp): fix remaining assertions --- .../tests/app_can_disable_community_pool_spends.rs | 12 ++++++++---- .../tests/app_can_propose_community_pool_spends.rs | 13 +++++++++---- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/crates/core/app/tests/app_can_disable_community_pool_spends.rs b/crates/core/app/tests/app_can_disable_community_pool_spends.rs index a0785fb283..4cfb3c6b3a 100644 --- a/crates/core/app/tests/app_can_disable_community_pool_spends.rs +++ b/crates/core/app/tests/app_can_disable_community_pool_spends.rs @@ -327,7 +327,8 @@ async fn app_can_disable_community_pool_spends() -> anyhow::Result<()> { // After we deposit a note into the community pool, we should see the original pool contents, // plus the amount that we deposited. assert_eq!( - [(note.asset_id(), note.amount())] + [(note.asset_id(), note.amount()), + (*STAKING_TOKEN_ASSET_ID, Amount::zero())] .into_iter() .collect::>(), post_deposit_pool_balance, @@ -364,9 +365,12 @@ async fn app_can_disable_community_pool_spends() -> anyhow::Result<()> { // After any possible voting period, we should see the same pool balance. assert_eq!( post_voting_period_pool_balance, - [(note.asset_id(), note.amount())] - .into_iter() - .collect::>(), + [ + (note.asset_id(), note.amount()), + (*STAKING_TOKEN_ASSET_ID, Amount::zero()) + ] + .into_iter() + .collect::>(), "a rejected proposal should not decrease the funds of the community pool" ); assert_eq!( diff --git a/crates/core/app/tests/app_can_propose_community_pool_spends.rs b/crates/core/app/tests/app_can_propose_community_pool_spends.rs index 334b1e4a87..2b7d31be0f 100644 --- a/crates/core/app/tests/app_can_propose_community_pool_spends.rs +++ b/crates/core/app/tests/app_can_propose_community_pool_spends.rs @@ -320,9 +320,12 @@ async fn app_can_propose_community_pool_spends() -> anyhow::Result<()> { // After we deposit a note into the community pool, we should see the original pool contents, // plus the amount that we deposited. assert_eq!( - [(note.asset_id(), note.amount())] - .into_iter() - .collect::>(), + [ + (note.asset_id(), note.amount()), + (*STAKING_TOKEN_ASSET_ID, Amount::zero()) + ] + .into_iter() + .collect::>(), post_deposit_pool_balance, "a community pool deposit should be reflected in the visible balance" ); @@ -362,7 +365,9 @@ async fn app_can_propose_community_pool_spends() -> anyhow::Result<()> { // After the proposal passes, we should see the balance decrease by the amount proposed. assert_eq!( post_voting_period_pool_balance, - BTreeMap::default(), + [(*STAKING_TOKEN_ASSET_ID, Amount::zero())] + .into_iter() + .collect::>(), "the successful proposal should decrease the funds of the community pool" ); assert_eq!(