Skip to content

Commit

Permalink
proposal improv
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lima committed Jul 14, 2023
1 parent 04a9564 commit 4a5fdbb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/RolesRegistry.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Roles Registry', () => {

before(async function () {
// eslint-disable-next-line prettier/prettier
[deployer, roleCreator, userOne, userTwo] = await ethers.getSigners()
;[deployer, roleCreator, userOne, userTwo] = await ethers.getSigners()

Check failure on line 24 in test/RolesRegistry.spec.ts

View workflow job for this annotation

GitHub Actions / build_test_deploy

Unnecessary semicolon
})

beforeEach(async () => {
Expand Down Expand Up @@ -53,7 +53,7 @@ describe('Roles Registry', () => {
.grantRole(role, userOne.address, mockERC721.address, tokenId, expirationDate, data),
)
.to.emit(rolesRegistry, 'RoleGranted')
.withArgs(role, userOne.address, expirationDate, mockERC721.address, tokenId, data)
.withArgs(role, roleCreator.address, userOne.address, expirationDate, mockERC721.address, tokenId, data)
})
it('should NOT grant role if expiration date is in the past', async () => {
const blockNumber = await hre.ethers.provider.getBlockNumber()
Expand All @@ -72,7 +72,7 @@ describe('Roles Registry', () => {
it('should revoke role', async () => {
await expect(rolesRegistry.connect(roleCreator).revokeRole(role, userOne.address, mockERC721.address, tokenId))
.to.emit(rolesRegistry, 'RoleRevoked')
.withArgs(role, userOne.address, mockERC721.address, tokenId)
.withArgs(role, roleCreator.address, userOne.address, mockERC721.address, tokenId)
})
})

Expand All @@ -84,15 +84,15 @@ describe('Roles Registry', () => {
.grantRole(role, userOne.address, mockERC721.address, tokenId, expirationDate, HashZero),
)
.to.emit(rolesRegistry, 'RoleGranted')
.withArgs(role, userOne.address, expirationDate, mockERC721.address, tokenId, HashZero)
.withArgs(role, roleCreator.address, userOne.address, expirationDate, mockERC721.address, tokenId, HashZero)

await expect(
rolesRegistry
.connect(roleCreator)
.grantRole(role, userTwo.address, mockERC721.address, tokenId, expirationDate, HashZero),
)
.to.emit(rolesRegistry, 'RoleGranted')
.withArgs(role, userTwo.address, expirationDate, mockERC721.address, tokenId, HashZero)
.withArgs(role, roleCreator.address, userTwo.address, expirationDate, mockERC721.address, tokenId, HashZero)
})

describe('Single User Roles', async () => {
Expand Down Expand Up @@ -203,7 +203,7 @@ describe('Roles Registry', () => {
.grantRole(role, userOne.address, mockERC721.address, tokenId, expirationDate, customData),
)
.to.emit(rolesRegistry, 'RoleGranted')
.withArgs(role, userOne.address, expirationDate, mockERC721.address, tokenId, customData)
.withArgs(role, roleCreator.address, userOne.address, expirationDate, mockERC721.address, tokenId, customData)

const returnedData = await rolesRegistry.roleData(
role,
Expand Down

0 comments on commit 4a5fdbb

Please sign in to comment.