* Extract standard token behaviuor to reuse it in other tests * Add opt in ERC20 migration contract * Make migration contract not to depend from standard token * Changes based on feedback * Improve MigratableERC20 inline documentation * move behaviors to behaviors directory * refactor MigratableERC20 into ERC20Migrator * fix errors * change expectEvent to support multiple events with same name * fix tests * update documentation * rename MigratableERC20 files to ERC20Migrator * move to drafts * test beginMigration * rename to ERC20Migrator * missing semicolon (╯°□°)╯︵ ┻━┻ * add non-zero check * improve documentation based on review comments * improve test descriptions * improve docs * add getters * fix contract * improve tests
21 lines
763 B
JavaScript
21 lines
763 B
JavaScript
const { shouldBehaveLikeERC20Mintable } = require('./behaviors/ERC20Mintable.behavior');
|
|
const ERC20MintableMock = artifacts.require('ERC20MintableMock');
|
|
const { shouldBehaveLikePublicRole } = require('../../access/roles/PublicRole.behavior');
|
|
|
|
contract('ERC20Mintable', function ([_, minter, otherMinter, ...otherAccounts]) {
|
|
beforeEach(async function () {
|
|
this.token = await ERC20MintableMock.new({ from: minter });
|
|
});
|
|
|
|
describe('minter role', function () {
|
|
beforeEach(async function () {
|
|
this.contract = this.token;
|
|
await this.contract.addMinter(otherMinter, { from: minter });
|
|
});
|
|
|
|
shouldBehaveLikePublicRole(minter, otherMinter, otherAccounts, 'minter');
|
|
});
|
|
|
|
shouldBehaveLikeERC20Mintable(minter, otherAccounts);
|
|
});
|