Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Last active August 6, 2021 11:27
Show Gist options
  • Save percybolmer/d9624b43e07106161abc8eebd8d2a444 to your computer and use it in GitHub Desktop.
Save percybolmer/d9624b43e07106161abc8eebd8d2a444 to your computer and use it in GitHub Desktop.
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