Add the following test in the FortaStakingVault.t.sol
file:
function test_stall_undelegations() external {
_deposit(alice, 100 ether, 100 ether);
uint256 subject1 = 55;
//delegate and initiate undelegate
vm.startPrank(operator);
vault.delegate(subject1, 50 ether);
(, address distributor) = vault.initiateUndelegate(subject1, 50 ether);
vm.stopPrank();
// wait thawing period
vm.warp(block.timestamp + 20 days);
// send 1 FORT to bob and transfer it to the distributor
vm.startPrank(bob);
deal(address(FORT_TOKEN), bob, 1);
FORT_TOKEN.transfer(distributor, 1);
vm.stopPrank();
// undelegate subjects
vault.undelegate(subject1);
}
Finally, run in a console the following command:
~$ forge test --mt test_stall_undelegations