Skip to content

Commit 11a3b00

Browse files
committed
test: fixed broken test
1 parent 8c3f223 commit 11a3b00

File tree

1 file changed

+5
-9
lines changed
  • packages/contracts/test/core/dao

1 file changed

+5
-9
lines changed

packages/contracts/test/core/dao/dao.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ describe('DAO', function () {
141141
ownerAddress,
142142
PERMISSION_IDS.UPGRADE_DAO_PERMISSION_ID
143143
),
144-
dao.grant(
145-
dao.address,
146-
ownerAddress,
147-
PERMISSION_IDS.VALIDATE_SIGNATURE_PERMISSION_ID
148-
),
149144
dao.grant(
150145
dao.address,
151146
ownerAddress,
@@ -1230,17 +1225,18 @@ describe('DAO', function () {
12301225
).to.be.eq(true);
12311226
});
12321227

1233-
it('reverts all signatures requests by default', async () => {
1228+
it('treats signatures as invalid by default if no permission is set', async () => {
12341229
const caller = signers[0];
12351230
const signer = signers[1];
12361231

12371232
const message = 'Hi!';
12381233
const hash = ethers.utils.hashMessage(message);
12391234
const signature = await signer.signMessage(message);
12401235

1241-
// The caller can validate signatures now.
1242-
expect(await dao.connect(caller).isValidSignature(hash, signature)).to.be
1243-
.reverted;
1236+
// Because no permission is set, the signature is said to be invalid
1237+
expect(
1238+
await dao.connect(caller).isValidSignature(hash, signature)
1239+
).to.equal(INVALID_ERC1271_SIGNATURE);
12441240
});
12451241

12461242
it('allows caller specific signature validation', async () => {

0 commit comments

Comments
 (0)