conditionStateChecks test modifier

This commit is contained in:
gozzy 2023-04-09 15:29:03 +00:00
parent 882ff7c5ae
commit 3b42af8de9

View File

@ -12,14 +12,18 @@ import "forge-std/Test.sol";
contract ProposalTest is Test, Parameters, Mock { contract ProposalTest is Test, Parameters, Mock {
function testProposal() public { modifier conditionStateChecks() {
checkParameters(); checkParameters();
_;
checkResults();
}
function testProposal()
conditionStateChecks
public {
uint256 proposalId = voteAndCreateProposal(address(new Proposal())); uint256 proposalId = voteAndCreateProposal(address(new Proposal()));
IGovernance(_governanceAddress).execute(proposalId); IGovernance(_governanceAddress).execute(proposalId);
checkResults();
} }
function voteAndCreateProposal(address proposalAddress) public returns (uint256) { function voteAndCreateProposal(address proposalAddress) public returns (uint256) {