mirror of https://github.com/logos-co/staking.git
chore(StakeManager.t): add test for unstake more than balance
This commit is contained in:
parent
6c4f5d16f2
commit
cd3f238a08
|
@ -317,6 +317,14 @@ contract UnstakeTest is StakeManagerTest {
|
|||
assertEq(totalSupplyMPAfter, totalSupplyMPBefore - (currentMPBefore * percentToBurn / 100));
|
||||
assertEq(ERC20(stakeToken).balanceOf(testUser), unstakeAmount);
|
||||
}
|
||||
|
||||
function test_RevertWhen_AmountMoreThanBalance() public {
|
||||
uint256 stakeAmount = 100;
|
||||
StakeVault userVault = _createStakingAccount(testUser, stakeAmount);
|
||||
vm.startPrank(testUser);
|
||||
vm.expectRevert(StakeManager.StakeManager__InsufficientFunds.selector);
|
||||
userVault.unstake(stakeAmount + 1);
|
||||
}
|
||||
}
|
||||
|
||||
contract LockTest is StakeManagerTest {
|
||||
|
|
Loading…
Reference in New Issue