From 4865b3c15a340f314afdf53396c3d5f9cc51e55a Mon Sep 17 00:00:00 2001 From: smol-ninja Date: Thu, 31 Oct 2024 21:51:36 +0000 Subject: [PATCH] test: fix test for batch --- test/core/integration/concrete/lockup/batch/batch.t.sol | 5 +++-- test/core/integration/concrete/lockup/batch/batch.tree | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/core/integration/concrete/lockup/batch/batch.t.sol b/test/core/integration/concrete/lockup/batch/batch.t.sol index 5c0f120e5..55ec13ca4 100644 --- a/test/core/integration/concrete/lockup/batch/batch.t.sol +++ b/test/core/integration/concrete/lockup/batch/batch.t.sol @@ -6,10 +6,11 @@ import { Errors } from "src/core/libraries/Errors.sol"; import { Integration_Test } from "./../../../Integration.t.sol"; abstract contract Batch_Integration_Concrete_Test is Integration_Test { - function test_WhenCallFunctionNotExist() external { + function test_RevertWhen_CallFunctionNotExist() external { bytes[] memory calls = new bytes[](1); - calls[0] = abi.encodeCall(dai.balanceOf, (users.recipient)); + calls[0] = abi.encodeWithSignature("nonExistentFunction()"); + vm.expectRevert(); lockup.batch(calls); } diff --git a/test/core/integration/concrete/lockup/batch/batch.tree b/test/core/integration/concrete/lockup/batch/batch.tree index 4537d28f9..b720dde0c 100644 --- a/test/core/integration/concrete/lockup/batch/batch.tree +++ b/test/core/integration/concrete/lockup/batch/batch.tree @@ -1,6 +1,6 @@ Batch_Integration_Concrete_Test ├── when call function not exist -│ └── it should do nothing +│ └── it should revert └── when call function exists ├── when data invalid │ └── it should revert