mirror of
https://github.com/logos-co/staking.git
synced 2025-01-11 03:06:24 +00:00
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(totalSupplyMPAfter, totalSupplyMPBefore - (currentMPBefore * percentToBurn / 100));
|
||||||
assertEq(ERC20(stakeToken).balanceOf(testUser), unstakeAmount);
|
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 {
|
contract LockTest is StakeManagerTest {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user