Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
waynehoover committed Jun 29, 2023
1 parent 28b4a96 commit b78c284
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions test/Quest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ describe('Quest', async () => {

describe('setJsonSpecCID()', () => {
it('should only allow the owner to set', async () => {
await expect(deployedQuestContract.connect(firstAddress).setJsonSpecCID('cidhere')).to.be.revertedWith(
'Ownable: caller is not the owner'
await expect(deployedQuestContract.connect(firstAddress).setJsonSpecCID('cidhere')).to.be.revertedWithCustomError(
questContract,
'Unauthorized'
)
})

Expand Down Expand Up @@ -229,8 +230,9 @@ describe('Quest', async () => {

describe('queue()', () => {
it('should only allow the owner to start', async () => {
await expect(deployedQuestContract.connect(firstAddress).queue()).to.be.revertedWith(
'Ownable: caller is not the owner'
await expect(deployedQuestContract.connect(firstAddress).queue()).to.be.revertedWithCustomError(
questContract,
'Unauthorized'
)
})

Expand All @@ -243,8 +245,9 @@ describe('Quest', async () => {

describe('pause()', () => {
it('should only allow the owner to pause', async () => {
await expect(deployedQuestContract.connect(firstAddress).pause()).to.be.revertedWith(
'Ownable: caller is not the owner'
await expect(deployedQuestContract.connect(firstAddress).pause()).to.be.revertedWithCustomError(
questContract,
'Unauthorized'
)
})

Expand All @@ -259,8 +262,9 @@ describe('Quest', async () => {

describe('unPause()', () => {
it('should only allow the owner to pause', async () => {
await expect(deployedQuestContract.connect(firstAddress).unPause()).to.be.revertedWith(
'Ownable: caller is not the owner'
await expect(deployedQuestContract.connect(firstAddress).unPause()).to.be.revertedWithCustomError(
questContract,
'Unauthorized'
)
})

Expand Down

0 comments on commit b78c284

Please sign in to comment.