You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
834 B
25 lines
834 B
const { assertRevert } = require('../../helpers/assertRevert');
|
|
const { ether } = require('../../helpers/ether');
|
|
const { shouldBehaveLikeMintableToken } = require('./MintableToken.behavior');
|
|
const { shouldBehaveLikeCappedToken } = require('./CappedToken.behavior');
|
|
|
|
const CappedToken = artifacts.require('CappedToken');
|
|
|
|
contract('Capped', function ([_, owner, ...otherAccounts]) {
|
|
const cap = ether(1000);
|
|
|
|
it('requires a non-zero cap', async function () {
|
|
await assertRevert(
|
|
CappedToken.new(0, { from: owner })
|
|
);
|
|
});
|
|
|
|
context('once deployed', async function () {
|
|
beforeEach(async function () {
|
|
this.token = await CappedToken.new(cap, { from: owner });
|
|
});
|
|
|
|
shouldBehaveLikeCappedToken(owner, otherAccounts, cap);
|
|
shouldBehaveLikeMintableToken(owner, owner, otherAccounts);
|
|
});
|
|
});
|
|
|