Commit 2b62f349 by Federico Bond

Fill totalSupply in StandardTokenMock

parent d7b38038
...@@ -6,6 +6,7 @@ contract StandardTokenMock is StandardToken { ...@@ -6,6 +6,7 @@ contract StandardTokenMock is StandardToken {
function StandardTokenMock(address initialAccount, uint initialBalance) { function StandardTokenMock(address initialAccount, uint initialBalance) {
balances[initialAccount] = initialBalance; balances[initialAccount] = initialBalance;
totalSupply = initialBalance;
} }
} }
contract('StandardToken', function(accounts) { contract('StandardToken', function(accounts) {
it("should return the correct totalSupply after construction", function(done) {
return StandardTokenMock.new(accounts[0], 100)
.then(function(token) {
return token.totalSupply();
})
.then(function(totalSupply) {
assert.equal(totalSupply, 100);
})
.then(done);
})
it("should return the correct allowance amount after approval", function(done) { it("should return the correct allowance amount after approval", function(done) {
var token; var token;
return StandardTokenMock.new() return StandardTokenMock.new()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment