Skip to content

Commit

Permalink
test: the proposal should not be executed if there is not enough votes
Browse files Browse the repository at this point in the history
  • Loading branch information
TravellerOnTheRun committed Jul 1, 2024
1 parent f7adfdc commit ecccce6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/Governor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ describe('RootDAO Contact', () => {
const error = `GovernorAlreadyCastVote(${holders[1].address})`
expect(governor.connect(holders[1]).castVote(proposalId, 2)).to.be.revertedWith(error)
})

it('the proposal should not be executed if there is not enough votes', async () => {
const error = `GovernorUnexpectedProposalState(${proposalId})`
expect(governor.connect(holders[2])['execute(uint256)'](proposalId)).to.be.revertedWith(error)
})
})
})
})

0 comments on commit ecccce6

Please sign in to comment.