Created
April 24, 2018 12:49
-
-
Save MrCrambo/3d714eff3bbff3a51c93412af66e17da 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
describe('approve', function () { | |
const amount = 100; | |
it('approves the requested amount', async function () { | |
await this.token.approve(this.to, amount, { from: this.owner }); | |
const allowance = await this.token.allowance(this.owner, this.to); | |
assert.equal(allowance, amount); | |
}); | |
it('approves the requested amount and replaces the previous one', async function () { | |
await this.token.approve(this.to, 1, { from: this.owner }); | |
await this.token.approve(this.to, amount, { from: this.owner }); | |
const allowance = await this.token.allowance(this.owner, this.to); | |
assert.equal(allowance, amount); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment