* replacing all instances of from: anyone with from: other * replacing all instances of from: anyone with from: other * replacing all instances of from: anyone with from: other * changing anyone to other * changing anyone to other
This commit is contained in:
@ -3,7 +3,7 @@ const { ZERO_ADDRESS } = constants;
|
||||
|
||||
const RolesMock = artifacts.require('RolesMock');
|
||||
|
||||
contract('Roles', function ([_, authorized, otherAuthorized, anyone]) {
|
||||
contract('Roles', function ([_, authorized, otherAuthorized, other]) {
|
||||
beforeEach(async function () {
|
||||
this.roles = await RolesMock.new();
|
||||
});
|
||||
@ -16,14 +16,14 @@ contract('Roles', function ([_, authorized, otherAuthorized, anyone]) {
|
||||
it('doesn\'t pre-assign roles', async function () {
|
||||
(await this.roles.has(authorized)).should.equal(false);
|
||||
(await this.roles.has(otherAuthorized)).should.equal(false);
|
||||
(await this.roles.has(anyone)).should.equal(false);
|
||||
(await this.roles.has(other)).should.equal(false);
|
||||
});
|
||||
|
||||
describe('adding roles', function () {
|
||||
it('adds roles to a single account', async function () {
|
||||
await this.roles.add(authorized);
|
||||
(await this.roles.has(authorized)).should.equal(true);
|
||||
(await this.roles.has(anyone)).should.equal(false);
|
||||
(await this.roles.has(other)).should.equal(false);
|
||||
});
|
||||
|
||||
it('reverts when adding roles to an already assigned account', async function () {
|
||||
@ -51,7 +51,7 @@ contract('Roles', function ([_, authorized, otherAuthorized, anyone]) {
|
||||
});
|
||||
|
||||
it('reverts when removing unassigned roles', async function () {
|
||||
await shouldFail.reverting(this.roles.remove(anyone));
|
||||
await shouldFail.reverting(this.roles.remove(other));
|
||||
});
|
||||
|
||||
it('reverts when removing roles from the zero account', async function () {
|
||||
|
||||
Reference in New Issue
Block a user