Skip to content

Commit

Permalink
test: adjust for usdt
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Feb 5, 2024
1 parent d9c602f commit 8438ed9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/test/HealthCheck.t.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.18;

import {Setup, IStrategy} from "./utils/Setup.sol";
import {Setup, IStrategy, SafeERC20, ERC20} from "./utils/Setup.sol";

import {MockHealthCheck, IMockHealthCheck} from "./mocks/MockHealthCheck.sol";

contract HealthCheckTest is Setup {
using SafeERC20 for ERC20;

IMockHealthCheck public healthCheck;

function setUp() public override {
Expand Down Expand Up @@ -294,11 +296,11 @@ contract HealthCheckTest is Setup {
);

// Loose .01%
uint256 loss = _amount / 10000;
uint256 loss = _amount / MAX_BPS;

// simulate loss
vm.prank(address(healthCheck));
asset.transfer(management, loss);
asset.safeTransfer(management, loss);

assertEq(
healthCheck.doHealthCheck(),
Expand Down Expand Up @@ -391,11 +393,11 @@ contract HealthCheckTest is Setup {
);

// Loose .01%
uint256 loss = _amount / 10_000;
uint256 loss = _amount / MAX_BPS;

// simulate loss
vm.prank(address(healthCheck));
asset.transfer(management, loss);
asset.safeTransfer(management, loss);

assertEq(
healthCheck.doHealthCheck(),
Expand Down
2 changes: 1 addition & 1 deletion src/test/utils/Setup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ contract Setup is ExtendedTest {

// Fuzz amount
uint256 public maxFuzzAmount = 1e12;
uint256 public minFuzzAmount = 100;
uint256 public minFuzzAmount = MAX_BPS;

// Default profit max unlock time is set for 10 days
uint256 public profitMaxUnlockTime = 10 days;
Expand Down

0 comments on commit 8438ed9

Please sign in to comment.