From cfa028ac1c6a4bc83c1553c651949be45401c5d3 Mon Sep 17 00:00:00 2001 From: andreivladbrg Date: Mon, 29 Apr 2024 16:44:35 +0300 Subject: [PATCH] test: remove unneeded delegatecall test in cancelMultiple --- .../cancel-multiple/cancelMultiple.t.sol | 6 --- .../cancel-multiple/cancelMultiple.tree | 47 +++++++++---------- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/test/integration/cancel-multiple/cancelMultiple.t.sol b/test/integration/cancel-multiple/cancelMultiple.t.sol index 0e07b221..2484ddde 100644 --- a/test/integration/cancel-multiple/cancelMultiple.t.sol +++ b/test/integration/cancel-multiple/cancelMultiple.t.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.22; -import { ISablierV2OpenEnded } from "src/interfaces/ISablierV2OpenEnded.sol"; import { Errors } from "src/libraries/Errors.sol"; import { Integration_Test } from "../Integration.t.sol"; @@ -13,11 +12,6 @@ contract CancelMultiple_Integration_Concrete_Test is Integration_Test { vm.warp({ newTimestamp: WARP_ONE_MONTH }); } - function test_RevertWhen_DelegateCall() external { - bytes memory callData = abi.encodeCall(ISablierV2OpenEnded.cancelMultiple, (defaultStreamIds)); - _test_RevertWhen_DelegateCall(callData); - } - function test_CancelMultiple_ArrayCountZero() external whenNotDelegateCalled { uint256[] memory streamIds = new uint256[](0); openEnded.cancelMultiple(streamIds); diff --git a/test/integration/cancel-multiple/cancelMultiple.tree b/test/integration/cancel-multiple/cancelMultiple.tree index e5718f7c..7ccdbccb 100644 --- a/test/integration/cancel-multiple/cancelMultiple.tree +++ b/test/integration/cancel-multiple/cancelMultiple.tree @@ -1,26 +1,23 @@ cancelMultiple.t.sol -├── when delegate called -│ └── it should revert -└── when not delegate called - ├── when the array count is zero - │ └── it should do nothing - └── when the array count is not zero - ├── given the stream IDs array references only null streams - │ └── it should revert - ├── given the stream IDs array references some null streams - │ └── it should revert - └── given the stream IDs array references only streams that are not null - ├── when the caller is unauthorized for all streams - │ ├── when the caller is a malicious third party - │ │ └── it should revert - │ └── when the caller is the recipient - │ └── it should revert - ├── when the caller is unauthorized for some streams - │ ├── when the caller is a malicious third party - │ │ └── it should revert - │ └── when the caller is the recipient - │ └── it should revert - └── when the caller is authorized for all streams - ├── it should cancel the streams - ├── it should update the rate per second for each stream - └── it should emit {CancelOpenEndedStream} events +├── when the array count is zero +│ └── it should do nothing +└── when the array count is not zero + ├── given the stream IDs array references only null streams + │ └── it should revert + ├── given the stream IDs array references some null streams + │ └── it should revert + └── given the stream IDs array references only streams that are not null + ├── when the caller is unauthorized for all streams + │ ├── when the caller is a malicious third party + │ │ └── it should revert + │ └── when the caller is the recipient + │ └── it should revert + ├── when the caller is unauthorized for some streams + │ ├── when the caller is a malicious third party + │ │ └── it should revert + │ └── when the caller is the recipient + │ └── it should revert + └── when the caller is authorized for all streams + ├── it should cancel the streams + ├── it should update the rate per second for each stream + └── it should emit {CancelOpenEndedStream} events