From 36452136f1ef26ecfeed3fa07404e3ec113c4489 Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Sun, 13 Aug 2017 22:41:25 -0300 Subject: [PATCH] add test for finishMinting --- test/MintableToken.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/MintableToken.js b/test/MintableToken.js index a3ae8968e..f6af9ebac 100644 --- a/test/MintableToken.js +++ b/test/MintableToken.js @@ -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) { @@ -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)); + }) + });