committed by
Nicolás Venturo
parent
66c1968913
commit
b52912c702
@ -1,19 +1,19 @@
|
||||
const { ether } = require('../../helpers/ether');
|
||||
const { shouldBehaveLikeRBACMintableToken } = require('./RBACMintableToken.behavior');
|
||||
const { shouldBehaveLikeMintableToken } = require('./MintableToken.behavior');
|
||||
const { shouldBehaveLikeCappedToken } = require('./CappedToken.behavior');
|
||||
|
||||
const RBACCappedTokenMock = artifacts.require('RBACCappedTokenMock');
|
||||
|
||||
contract('RBACCappedToken', function ([_, owner, minter, ...otherAccounts]) {
|
||||
const cap = ether(1000);
|
||||
|
||||
beforeEach(async function () {
|
||||
this.token = await RBACCappedTokenMock.new(cap, { from: owner });
|
||||
await this.token.addMinter(minter, { from: owner });
|
||||
});
|
||||
|
||||
shouldBehaveLikeMintableToken(owner, minter, otherAccounts);
|
||||
shouldBehaveLikeRBACMintableToken(owner, otherAccounts);
|
||||
shouldBehaveLikeCappedToken(minter, otherAccounts, cap);
|
||||
});
|
||||
const { ether } = require('../../helpers/ether');
|
||||
const { shouldBehaveLikeRBACMintableToken } = require('./RBACMintableToken.behavior');
|
||||
const { shouldBehaveLikeMintableToken } = require('./MintableToken.behavior');
|
||||
const { shouldBehaveLikeCappedToken } = require('./CappedToken.behavior');
|
||||
|
||||
const RBACCappedTokenMock = artifacts.require('RBACCappedTokenMock');
|
||||
|
||||
contract('RBACCappedToken', function ([_, owner, minter, ...otherAccounts]) {
|
||||
const cap = ether(1000);
|
||||
|
||||
beforeEach(async function () {
|
||||
this.token = await RBACCappedTokenMock.new(cap, { from: owner });
|
||||
await this.token.addMinter(minter, { from: owner });
|
||||
});
|
||||
|
||||
shouldBehaveLikeMintableToken(owner, minter, otherAccounts);
|
||||
shouldBehaveLikeRBACMintableToken(owner, otherAccounts);
|
||||
shouldBehaveLikeCappedToken(minter, otherAccounts, cap);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user