Last active
August 6, 2021 11:27
-
-
Save percybolmer/d9624b43e07106161abc8eebd8d2a444 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("cant withdraw bigger amount than current stake", async() => { | |
devToken = await DevToken.deployed(); | |
let owner = accounts[0]; | |
// Try withdrawing 200 from first stake | |
try { | |
await devToken.withdrawStake(200, 0, {from:owner}); | |
}catch(error){ | |
assert.equal(error.reason, "Staking: Cannot withdraw more than you have staked", "Failed to notice a too big withdrawal from stake"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment