Skip to content

Commit

Permalink
test: add missing unit test to complete coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
xorsal committed Oct 8, 2024
1 parent a5de287 commit 5bc065c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions solidity/test/unit/modules/finality/MultipleCallbacksModule.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,16 @@ contract MultipleCallbacksModule_Unit_FinalizeRequests is BaseTest {
vm.prank(_caller);
multipleCallbacksModule.finalizeRequest(_request, mockResponse, address(_caller));
}

function test_decodeRequestData(address[] memory _targets, bytes[] memory _data) public view {
// Create and set some mock request data
bytes memory _requestData = abi.encode(IMultipleCallbacksModule.RequestParameters({targets: _targets, data: _data}));

// Decode the given request data
IMultipleCallbacksModule.RequestParameters memory _params = multipleCallbacksModule.decodeRequestData(_requestData);

// Check: decoded values match original values?
assertEq(_params.targets, _targets);
assertEq(_params.data, _data);
}
}

0 comments on commit 5bc065c

Please sign in to comment.