Skip to content

Commit

Permalink
test: update branch in collectFees (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRBerg authored Dec 16, 2024
1 parent b5e32cb commit c965a7b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { Errors } from "src/libraries/Errors.sol";
import { Integration_Test } from "../../../Integration.t.sol";

contract CollectFees_Integration_Concrete_Test is Integration_Test {
function test_WhenAdminIsNotContract() external {
function test_GivenAdminIsNotContract() external {
_test_CollectFees(users.admin);
}

function test_RevertWhen_AdminDoesNotImplementReceiveFunction() external whenAdminIsContract {
function test_RevertGiven_AdminDoesNotImplementReceiveFunction() external givenAdminIsContract {
// Transfer the admin to a contract that does not implement the receive function.
resetPrank({ msgSender: users.admin });
lockup.transferAdmin(address(contractWithoutReceive));
Expand All @@ -32,7 +32,7 @@ contract CollectFees_Integration_Concrete_Test is Integration_Test {
lockup.collectFees();
}

function test_WhenAdminImplementsReceiveFunction() external whenAdminIsContract {
function test_GivenAdminImplementsReceiveFunction() external givenAdminIsContract {
// Transfer the admin to a contract that implements the receive function.
resetPrank({ msgSender: users.admin });
lockup.transferAdmin(address(contractWithReceive));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
CollectFees_Integration_Concrete_Test
├── when admin is not contract
├── given admin is not contract
│ ├── it should transfer fee
│ ├── it should decrease contract balance to zero
│ └── it should emit a {CollectFees} event
└── when admin is contract
├── when admin does not implement receive function
└── given admin is contract
├── given admin does not implement receive function
│ └── it should revert
└── when admin implements receive function
└── given admin implements receive function
├── it should transfer fee
├── it should decrease contract balance to zero
└── it should emit a {CollectFees} event
4 changes: 2 additions & 2 deletions tests/utils/Modifiers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,10 @@ abstract contract Modifiers is Fuzzers {
}

/*//////////////////////////////////////////////////////////////////////////
WITHDRAW-FEES
COLLECT-FEES
//////////////////////////////////////////////////////////////////////////*/

modifier whenAdminIsContract() {
modifier givenAdminIsContract() {
_;
}

Expand Down

0 comments on commit c965a7b

Please sign in to comment.