Skip to content

Commit

Permalink
test: check for correct value instead non-reverting call
Browse files Browse the repository at this point in the history
  • Loading branch information
heueristik committed Sep 1, 2023
1 parent c287c05 commit 89817bd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/contracts/test/core/dao/dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1325,10 +1325,12 @@ describe('DAO', function () {
expect(await mockCondition.answer()).to.be.true;

// Any caller can validate signatures using this condition now.
expect(await dao.connect(caller).isValidSignature(hash, signature)).to.not
.be.reverted;
expect(await dao.connect(otherCaller).isValidSignature(hash, signature))
.to.not.be.reverted;
expect(
await dao.connect(caller).isValidSignature(hash, signature)
).to.equal(VALID_ERC1271_SIGNATURE);
expect(
await dao.connect(otherCaller).isValidSignature(hash, signature)
).to.equal(VALID_ERC1271_SIGNATURE);

// Set the mock condition to answer false.
await mockCondition.setAnswer(false);
Expand Down

0 comments on commit 89817bd

Please sign in to comment.