Skip to content

Commit

Permalink
added delegation module query to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Feb 13, 2025
1 parent c2c7160 commit 60e1b71
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions contracts/delegation/dao-vote-delegation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ dao-voting-token-staked = { workspace = true, features = ["library"] }
dao-voting-cw721-staked = { workspace = true, features = ["library"] }
dao-testing = { workspace = true }
dao-proposal-sudo = { workspace = true }
dao-proposal-single = { workspace = true }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::ops::{Deref, DerefMut};

use cosmwasm_std::Decimal;
use cosmwasm_std::{Addr, Decimal};
use dao_testing::{Cw4TestDao, DaoTestingSuite};

use super::base::DaoVoteDelegationTestingSuiteBase;
Expand Down Expand Up @@ -110,5 +110,19 @@ impl Cw4DaoVoteDelegationTestingSuite {

// set the delegation module for all proposal modules
self.set_delegation_module(&dao, &delegation_addr);

// ensure delegation modules are set
dao.proposal_modules.iter().for_each(|(_, module)| {
let delegation_module = self
.querier()
.query_wasm_smart::<Option<Addr>>(
module,
&dao_proposal_single::msg::QueryMsg::DelegationModule {},
)
.unwrap()
.unwrap();

assert_eq!(delegation_module, Addr::unchecked(delegation_addr.clone()));
});
}
}

0 comments on commit 60e1b71

Please sign in to comment.