Last active
August 6, 2021 11:27
-
-
Save percybolmer/f32c7a918c7ae0da0b6034d18f0c7101 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
it("remove stake if empty", async() => { | |
devToken = await DevToken.deployed(); | |
let owner = accounts[0]; | |
let withdraw_amount = 50; | |
// Try withdrawing 50 from first stake AGAIN, this should empty the first stake | |
await devToken.withdrawStake(withdraw_amount, 0, {from:owner}); | |
// Grab a new summary to see if the total amount has changed | |
let summary = await devToken.hasStake(owner); | |
console.log(summary); | |
assert.equal(summary.stakes[0].user, "0x0000000000000000000000000000000000000000", "Failed to remove stake when it was empty"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment