Rename WhitelisterRole to WhitelistAdminRole. (#1589)

* Rename WhitelisterRole to WhitelistAdminRole.

* Update WhitelistAdmin changelog entry.
This commit is contained in:
Nicolás Venturo
2019-01-04 15:32:24 -03:00
committed by GitHub
parent a5b14f262e
commit 35d70397b6
9 changed files with 88 additions and 88 deletions

View 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');
});

View File

@ -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);
});

View File

@ -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');
});