Skip to content

Commit

Permalink
add test for finishMinting
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Aug 14, 2017
1 parent 4fc6bb7 commit 3645213
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/MintableToken.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const assertJump = require('./helpers/assertJump');
import expectThrow from './helpers/expectThrow';
var MintableToken = artifacts.require('../contracts/Tokens/MintableToken.sol');

contract('Mintable', function(accounts) {
Expand Down Expand Up @@ -37,4 +37,10 @@ contract('Mintable', function(accounts) {
assert(totalSupply, 100);
})

it('should fail to mint after call to finishMinting', async function () {
await token.finishMinting();
assert.equal(await token.mintingFinished(), true);
await expectThrow(token.mint(accounts[0], 100));
})

});

0 comments on commit 3645213

Please sign in to comment.