Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: update branch #1118

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading