Skip to content

Commit 59a7f0e

Browse files
committed
Add a test case for disabled panic button
1 parent 21ceeb4 commit 59a7f0e

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

solidity/test/TestRegistry.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,26 @@ describe('Registry', () => {
151151
)
152152
})
153153

154+
it("can not be called on contracts with disabled panic button", async () => {
155+
await registry.disableOperatorContractPanicButton(
156+
operatorContract1,
157+
{ from: governance }
158+
)
159+
assert.equal(
160+
await registry.panicButtons(operatorContract1),
161+
"0x0000000000000000000000000000000000000000",
162+
"Panic button not disabled correctly"
163+
)
164+
await expectRevert(
165+
registry.setOperatorContractPanicButton(
166+
operatorContract1,
167+
someoneElse,
168+
{ from: governance }
169+
),
170+
"Disabled panic button cannot be updated"
171+
)
172+
})
173+
154174
it("updates contract panic button", async () => {
155175
await registry.setOperatorContractPanicButton(
156176
operatorContract1,
@@ -497,4 +517,4 @@ describe('Registry', () => {
497517
)
498518
})
499519
})
500-
})
520+
})

0 commit comments

Comments
 (0)