dexorder
This commit is contained in:
19
lib_openzeppelin_contracts/test/access/AccessControl.test.js
Normal file
19
lib_openzeppelin_contracts/test/access/AccessControl.test.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const { ethers } = require('hardhat');
|
||||
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
|
||||
|
||||
const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl } = require('./AccessControl.behavior');
|
||||
|
||||
async function fixture() {
|
||||
const [defaultAdmin, ...accounts] = await ethers.getSigners();
|
||||
const mock = await ethers.deployContract('$AccessControl');
|
||||
await mock.$_grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);
|
||||
return { mock, defaultAdmin, accounts };
|
||||
}
|
||||
|
||||
describe('AccessControl', function () {
|
||||
beforeEach(async function () {
|
||||
Object.assign(this, await loadFixture(fixture));
|
||||
});
|
||||
|
||||
shouldBehaveLikeAccessControl();
|
||||
});
|
||||
Reference in New Issue
Block a user