conditionStateChecks test modifier
This commit is contained in:
parent
882ff7c5ae
commit
3b42af8de9
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user