Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recount vote test #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add recount vote test #57

wants to merge 1 commit into from

Conversation

cabrador
Copy link
Contributor

This PR adds tests which tests that recountVotes() in votesbook.

This is triggered by being over the voting cap per voter and having a vote on a non-active proposal - hence this vote is removed from votesbook

@cabrador cabrador requested a review from thaarok February 28, 2025 12:57
thaarok
thaarok approved these changes Feb 28, 2025
@@ -1437,6 +1437,37 @@ describe("Governance voting test", function () {
await this.votebook.connect(this.defaultAcc).setMaxProposalsPerVoter(3);
await this.gov.connect(this.firstVoterAcc).vote(this.delegatorAcc, proposalID3, choices);
});

it("onVoted() should call recountVote if voter has voted too many times", async function () {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should be called something like "maximum votes enforced, expired released"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants