Skip to content

Commit

Permalink
[#397] Add test: Emit event when a signer is created
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-ap committed Apr 29, 2024
1 parent a51f558 commit a72e9a3
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ describe('SafeWebAuthnSignerFactory', () => {
expect(await factory.createSigner.staticCall(x, y, verifiers)).to.eq(signer)
await expect(factory.createSigner(x, y, verifiers)).to.not.be.reverted
})

it('Should emit event when a signer is created', async () => {
const { factory, verifiers } = await setupTests()
const x = ethers.id('publicKey.x')
const y = ethers.id('publicKey.y')

const signer = await factory.createSigner.staticCall(x, y, verifiers)

await expect(factory.createSigner(x, y, verifiers))
.to.emit(factory, 'Created')
.withArgs(signer, x, y, verifiers)
})
})

describe('isValidSignatureForSigner', function () {
Expand Down

0 comments on commit a72e9a3

Please sign in to comment.