Skip to content

Commit

Permalink
add extra test
Browse files Browse the repository at this point in the history
- testMakeDepositForUserThroughManager
  • Loading branch information
vm06007 committed Jan 16, 2024
1 parent 15e2421 commit 0503743
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions contracts/TimeLockFarmV2Dual.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,40 @@ contract TimeLockFarmV2DualTest is Test {
);
}

function testMakeDepositForUserThroughManager()
public
{
uint256 depositAmount = tokens(100_000);

vm.startPrank(
ADMIN_ADDRESS
);

verseToken.transfer(
address(manager),
depositAmount
);

uint256 balanceBefore = verseToken.balanceOf(
address(farm)
);

manager.makeDepositForUser({
_stakeOwner: ADMIN_ADDRESS,
_stakeAmount: depositAmount,
_lockingTime: DEFAULT_DURATION
});

uint256 balanceAfter = verseToken.balanceOf(
address(farm)
);

assertEq(
balanceAfter - balanceBefore,
depositAmount
);
}

function testFarmWithdraw()
public
{
Expand Down

0 comments on commit 0503743

Please sign in to comment.