You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
763 B
24 lines
763 B
const { ethers } = require('hardhat');
|
|
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
|
|
|
|
const {
|
|
DEFAULT_ADMIN_ROLE,
|
|
shouldBehaveLikeAccessControl,
|
|
shouldBehaveLikeAccessControlEnumerable,
|
|
} = require('../AccessControl.behavior');
|
|
|
|
async function fixture() {
|
|
const [defaultAdmin, ...accounts] = await ethers.getSigners();
|
|
const mock = await ethers.deployContract('$AccessControlEnumerable');
|
|
await mock.$_grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);
|
|
return { mock, defaultAdmin, accounts };
|
|
}
|
|
|
|
describe('AccessControlEnumerable', function () {
|
|
beforeEach(async function () {
|
|
Object.assign(this, await loadFixture(fixture));
|
|
});
|
|
|
|
shouldBehaveLikeAccessControl();
|
|
shouldBehaveLikeAccessControlEnumerable();
|
|
});
|
|
|