Rename WhitelisterRole to WhitelistAdminRole. (#1589)
* Rename WhitelisterRole to WhitelistAdminRole. * Update WhitelistAdmin changelog entry.
This commit is contained in:
11
test/access/roles/WhitelistAdminRole.test.js
Normal file
11
test/access/roles/WhitelistAdminRole.test.js
Normal file
@ -0,0 +1,11 @@
|
||||
const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior');
|
||||
const WhitelistAdminRoleMock = artifacts.require('WhitelistAdminRoleMock');
|
||||
|
||||
contract('WhitelistAdminRole', function ([_, whitelistAdmin, otherWhitelistAdmin, ...otherAccounts]) {
|
||||
beforeEach(async function () {
|
||||
this.contract = await WhitelistAdminRoleMock.new({ from: whitelistAdmin });
|
||||
await this.contract.addWhitelistAdmin(otherWhitelistAdmin, { from: whitelistAdmin });
|
||||
});
|
||||
|
||||
shouldBehaveLikePublicRole(whitelistAdmin, otherWhitelistAdmin, otherAccounts, 'whitelistAdmin');
|
||||
});
|
||||
@ -1,12 +1,12 @@
|
||||
const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior');
|
||||
const WhitelistedRoleMock = artifacts.require('WhitelistedRoleMock');
|
||||
|
||||
contract('WhitelistedRole', function ([_, whitelisted, otherWhitelisted, whitelister, ...otherAccounts]) {
|
||||
contract('WhitelistedRole', function ([_, whitelisted, otherWhitelisted, whitelistAdmin, ...otherAccounts]) {
|
||||
beforeEach(async function () {
|
||||
this.contract = await WhitelistedRoleMock.new({ from: whitelister });
|
||||
await this.contract.addWhitelisted(whitelisted, { from: whitelister });
|
||||
await this.contract.addWhitelisted(otherWhitelisted, { from: whitelister });
|
||||
this.contract = await WhitelistedRoleMock.new({ from: whitelistAdmin });
|
||||
await this.contract.addWhitelisted(whitelisted, { from: whitelistAdmin });
|
||||
await this.contract.addWhitelisted(otherWhitelisted, { from: whitelistAdmin });
|
||||
});
|
||||
|
||||
shouldBehaveLikePublicRole(whitelisted, otherWhitelisted, otherAccounts, 'whitelisted', whitelister);
|
||||
shouldBehaveLikePublicRole(whitelisted, otherWhitelisted, otherAccounts, 'whitelisted', whitelistAdmin);
|
||||
});
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior');
|
||||
const WhitelisterRoleMock = artifacts.require('WhitelisterRoleMock');
|
||||
|
||||
contract('WhitelisterRole', function ([_, whitelister, otherWhitelister, ...otherAccounts]) {
|
||||
beforeEach(async function () {
|
||||
this.contract = await WhitelisterRoleMock.new({ from: whitelister });
|
||||
await this.contract.addWhitelister(otherWhitelister, { from: whitelister });
|
||||
});
|
||||
|
||||
shouldBehaveLikePublicRole(whitelister, otherWhitelister, otherAccounts, 'whitelister');
|
||||
});
|
||||
Reference in New Issue
Block a user