Skip to content

Commit

Permalink
test: the same holder should not be able to cast the vote for the sam…
Browse files Browse the repository at this point in the history
…e proposal
  • Loading branch information
TravellerOnTheRun committed Jul 1, 2024
1 parent 568ad2c commit f7adfdc
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 @@ -197,6 +197,11 @@ describe('RootDAO Contact', () => {
const { againstVotes } = await governor.proposalVotes(proposalId)
expect(againstVotes).to.be.equal(await stRIF.getVotes(holders[15]))
})

it('the same holder should not be able to cast the vote for the same proposal', async () => {
const error = `GovernorAlreadyCastVote(${holders[1].address})`
expect(governor.connect(holders[1]).castVote(proposalId, 2)).to.be.revertedWith(error)
})
})
})
})

0 comments on commit f7adfdc

Please sign in to comment.