Last active
April 10, 2018 20:21
-
-
Save MrCrambo/8550220477e9b126b8d15f8c6d662ed5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract('ExampleToken', accounts => { | |
beforeEach(async function() { | |
this.owner = accounts[0] | |
this.token = await ExampleToken.new() | |
}) | |
it('all values should be set on constructor call', async function() { | |
const totalSupply = await this.token.totalSupply(); | |
assert.equal(1000, totalSupply.valueOf(), "correct total supply should be set") | |
const balance = await this.token.balanceOf.call(this.owner) | |
assert.equal(1000, balance.valueOf(), "balance should be equal to total supply") | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment