Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clemsos committed May 21, 2024
1 parent 6f70dae commit 96c9d3c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion smart-contracts/test/Lock/hooks/CaptchaHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('CaptchaHook', function () {
[await aThird.getAddress()],
['0x']
),
'ECDSA: invalid signature length'
'ECDSAInvalidSignatureLength'
)
})
})
5 changes: 3 additions & 2 deletions smart-contracts/test/Lock/hooks/GitcoinHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('GitcoinHook', function () {
[await aThird.getAddress()],
['0x']
),
'ECDSA: invalid signature length'
'ECDSAInvalidSignatureLength'
)
})

Expand All @@ -96,6 +96,7 @@ describe('GitcoinHook', function () {
await hook.addSigner(await signer.getAddress())
expect(await hook.signers(await signer.getAddress())).to.equal(true)
expect(await hook.owner()).to.equal(await user.getAddress())
const previousOwner = await hook.owner()

// Transfer ownership
await hook.transferOwnership(await anotherUser.getAddress())
Expand All @@ -105,7 +106,7 @@ describe('GitcoinHook', function () {
const anotherSigner = ethers.Wallet.createRandom()
await reverts(
hook.addSigner(await anotherSigner.getAddress()),
'Ownable: caller is not the owner'
`OwnableUnauthorizedAccount("${previousOwner}")`
)
expect(await hook.signers(await anotherSigner.getAddress())).to.equal(false)

Expand Down
4 changes: 2 additions & 2 deletions smart-contracts/test/Lock/hooks/GuildHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('GuildHook', function () {
[await aThird.getAddress()],
['0x']
),
'ECDSA: invalid signature length'
'ECDSAInvalidSignatureLength'
)
})

Expand All @@ -105,7 +105,7 @@ describe('GuildHook', function () {
const anotherSigner = ethers.Wallet.createRandom()
await reverts(
hook.addSigner(await anotherSigner.getAddress()),
'Ownable: caller is not the owner'
'OwnableUnauthorizedAccount'
)
expect(await hook.signers(await anotherSigner.getAddress())).to.equal(false)

Expand Down
4 changes: 2 additions & 2 deletions smart-contracts/test/Lock/renewMembershipFor.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ describe('Lock / Recurring memberships', () => {
// now reverts
await reverts(
lock.renewMembershipFor(tokenId, ADDRESS_ZERO),
'ERC20: insufficient allowance'
'ERC20InsufficientAllowance'
)
})

Expand Down Expand Up @@ -250,7 +250,7 @@ describe('Lock / Recurring memberships', () => {
// now funds are not enough
await reverts(
lock.renewMembershipFor(tokenId, ADDRESS_ZERO),
'ERC20: transfer amount exceeds balance'
'ERC20InsufficientBalance'
)
})
})
Expand Down

0 comments on commit 96c9d3c

Please sign in to comment.