StandardToken encapsulation (#1197)
* make StandardToken state variables private
* simplify mocks
* document new internal functions
* fix link to ERC20 document
* revert order of Transfer and Mint events
* Revert "simplify mocks"
This reverts commit 371fe3e567.
* add tests for new internal functions
* add check for null account
* add checks for balances and allowance
* add inline docs to BurnableToken._burn
* remove redundant checks and clarify why
This commit is contained in:
committed by
GitHub
parent
8d11dcc0e5
commit
4dcdd293e8
@ -1,4 +1,5 @@
|
||||
const { expectThrow } = require('../../helpers/expectThrow');
|
||||
const expectEvent = require('../../helpers/expectEvent');
|
||||
|
||||
const BigNumber = web3.BigNumber;
|
||||
|
||||
@ -15,8 +16,8 @@ function shouldBehaveLikeCappedToken (minter, [anyone], cap) {
|
||||
});
|
||||
|
||||
it('should mint when amount is less than cap', async function () {
|
||||
const result = await this.token.mint(anyone, cap.sub(1), { from });
|
||||
result.logs[0].event.should.equal('Mint');
|
||||
const { logs } = await this.token.mint(anyone, cap.sub(1), { from });
|
||||
expectEvent.inLogs(logs, 'Mint');
|
||||
});
|
||||
|
||||
it('should fail to mint if the ammount exceeds the cap', async function () {
|
||||
|
||||
Reference in New Issue
Block a user