ERC20Mintable.test.js 773 B

1234567891011121314151617181920
  1. const { shouldBehaveLikeERC20Mintable } = require('./behaviors/ERC20Mintable.behavior');
  2. const ERC20MintableMock = artifacts.require('ERC20MintableMock');
  3. const { shouldBehaveLikePublicRole } = require('../../behaviors/access/roles/PublicRole.behavior');
  4. contract('ERC20Mintable', function ([_, minter, otherMinter, ...otherAccounts]) {
  5. beforeEach(async function () {
  6. this.token = await ERC20MintableMock.new({ from: minter });
  7. });
  8. describe('minter role', function () {
  9. beforeEach(async function () {
  10. this.contract = this.token;
  11. await this.contract.addMinter(otherMinter, { from: minter });
  12. });
  13. shouldBehaveLikePublicRole(minter, otherMinter, otherAccounts, 'minter');
  14. });
  15. shouldBehaveLikeERC20Mintable(minter, otherAccounts);
  16. });