RBACCappedToken.test.js 821 B

12345678910111213141516171819
  1. const { ether } = require('../../helpers/ether');
  2. const { shouldBehaveLikeRBACMintableToken } = require('./RBACMintableToken.behavior');
  3. const { shouldBehaveLikeERC20Mintable } = require('./ERC20Mintable.behavior');
  4. const { shouldBehaveLikeERC20Capped } = require('./ERC20Capped.behavior');
  5. const RBACCappedTokenMock = artifacts.require('RBACCappedTokenMock');
  6. contract('RBACCappedToken', function ([_, owner, minter, ...otherAccounts]) {
  7. const cap = ether(1000);
  8. beforeEach(async function () {
  9. this.token = await RBACCappedTokenMock.new(cap, { from: owner });
  10. await this.token.addMinter(minter, { from: owner });
  11. });
  12. shouldBehaveLikeERC20Mintable(owner, minter, otherAccounts);
  13. shouldBehaveLikeRBACMintableToken(owner, otherAccounts);
  14. shouldBehaveLikeERC20Capped(minter, otherAccounts, cap);
  15. });