Skip to content

Commit

Permalink
test: specific tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Dec 8, 2023
1 parent 63beb7c commit 813897d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
12 changes: 9 additions & 3 deletions src/test/Operation.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ contract OperationTest is Setup {
mintAndDepositIntoStrategy(strategy, user, _amount);

// TODO: Implement logic so totalDebt is _amount and totalIdle = 0.
checkStrategyTotals(strategy, _amount, 0, _amount);
assertEq(strategy.totalAssets(), _amount, "!totalAssets");
assertEq(strategy.totalDebt(), 0, "!totalDebt");
assertEq(strategy.totalIdle(), _amount, "!totalIdle");

// Earn Interest
skip(1 days);
Expand Down Expand Up @@ -65,7 +67,9 @@ contract OperationTest is Setup {
mintAndDepositIntoStrategy(strategy, user, _amount);

// TODO: Implement logic so totalDebt is _amount and totalIdle = 0.
checkStrategyTotals(strategy, _amount, 0, _amount);
assertEq(strategy.totalAssets(), _amount, "!totalAssets");
assertEq(strategy.totalDebt(), 0, "!totalDebt");
assertEq(strategy.totalIdle(), _amount, "!totalIdle");

// Earn Interest
skip(1 days);
Expand Down Expand Up @@ -111,7 +115,9 @@ contract OperationTest is Setup {
mintAndDepositIntoStrategy(strategy, user, _amount);

// TODO: Implement logic so totalDebt is _amount and totalIdle = 0.
checkStrategyTotals(strategy, _amount, 0, _amount);
assertEq(strategy.totalAssets(), _amount, "!totalAssets");
assertEq(strategy.totalDebt(), 0, "!totalDebt");
assertEq(strategy.totalIdle(), _amount, "!totalIdle");

// Earn Interest
skip(1 days);
Expand Down
8 changes: 6 additions & 2 deletions src/test/Shutdown.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ contract ShutdownTest is Setup {
mintAndDepositIntoStrategy(strategy, user, _amount);

// TODO: Implement logic so totalDebt is _amount and totalIdle = 0.
checkStrategyTotals(strategy, _amount, 0, _amount);
assertEq(strategy.totalAssets(), _amount, "!totalAssets");
assertEq(strategy.totalDebt(), 0, "!totalDebt");
assertEq(strategy.totalIdle(), _amount, "!totalIdle");

// Earn Interest
skip(1 days);
Expand All @@ -25,7 +27,9 @@ contract ShutdownTest is Setup {
strategy.shutdownStrategy();

// TODO: Implement logic so totalDebt is _amount and totalIdle = 0.
checkStrategyTotals(strategy, _amount, 0, _amount);
assertEq(strategy.totalAssets(), _amount, "!totalAssets");
assertEq(strategy.totalDebt(), 0, "!totalDebt");
assertEq(strategy.totalIdle(), _amount, "!totalIdle");

// Make sure we can still withdraw the full amount
uint256 balanceBefore = asset.balanceOf(user);
Expand Down

0 comments on commit 813897d

Please sign in to comment.