Skip to content

Commit

Permalink
test: add testFuzz_CannotSetClientTakeRateOutOfRange
Browse files Browse the repository at this point in the history
  • Loading branch information
0xernesto committed Jan 31, 2024
1 parent 3575cbd commit 894d134
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/FeeCollector.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,18 @@ contract FeeCollectorTest is Test, TokenUtils, FeeUtils {
assertEq(postClientTakeRate, _clientTakeRate);
}

/// @dev
// - The client take Rate cannot be < 0 or > 100
function testFuzz_CannotSetClientTakeRateOutOfRange(uint256 _clientTakeRate) public {
// Assumptions
vm.assume(_clientTakeRate < 0 || _clientTakeRate > 100);

// Act
vm.prank(TEST_CLIENT);
vm.expectRevert(FeeCollector.OutOfRange.selector);
feeCollector.setClientTakeRate(_clientTakeRate);
}

/// @dev
// - The user savings should be correct according to what's calculated in expectations
// - The user savings should be <= maxClientFee
Expand Down

0 comments on commit 894d134

Please sign in to comment.