Cherry-pick "Fix v5.2 testing" from the release-v5.2 branch (#5342)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
@ -269,7 +269,9 @@ describe('GovernorCountingOverridable', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('can not vote twice', async function () {
|
it('can not vote twice', async function () {
|
||||||
await expect(this.mock.connect(this.voter1).castVote(this.helper.id, VoteType.Against));
|
await expect(this.mock.connect(this.voter1).castVote(this.helper.id, VoteType.Against))
|
||||||
|
.to.emit(this.mock, 'VoteCast')
|
||||||
|
.withArgs(this.voter1, this.helper.id, VoteType.Against, ethers.parseEther('5'), '');
|
||||||
await expect(this.mock.connect(this.voter1).castVote(this.helper.id, VoteType.Abstain))
|
await expect(this.mock.connect(this.voter1).castVote(this.helper.id, VoteType.Abstain))
|
||||||
.to.be.revertedWithCustomError(this.mock, 'GovernorAlreadyCastVote')
|
.to.be.revertedWithCustomError(this.mock, 'GovernorAlreadyCastVote')
|
||||||
.withArgs(this.voter1.address);
|
.withArgs(this.voter1.address);
|
||||||
|
|||||||
Reference in New Issue
Block a user