Skip to content

Commit

Permalink
add test for revert case of applyDestChainConfigUpdates()
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanRHall committed Aug 1, 2024
1 parent 40af04e commit 579dd5a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions contracts/src/v0.8/ccip/test/onRamp/EVM2EVMMultiOnRamp.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -765,4 +765,13 @@ contract EVM2EVMMultiOnRamp_applyDestChainConfigUpdates is EVM2EVMMultiOnRampSet
assertEq(address(s_sourceRouter), s_onRamp.getDestChainConfig(DEST_CHAIN_SELECTOR).router);
assertEq(address(9999), s_onRamp.getDestChainConfig(9999).router);
}

function test_ApplyDestChainConfigUpdates_WithInalidChainSelector_Revert() external {
vm.stopPrank();
vm.startPrank(OWNER);
EVM2EVMMultiOnRamp.DestChainConfigArgs[] memory configArgs = new EVM2EVMMultiOnRamp.DestChainConfigArgs[](1);
configArgs[0].destChainSelector = 0; // invalid
vm.expectRevert(abi.encodeWithSelector(EVM2EVMMultiOnRamp.InvalidDestChainConfig.selector, 0));
s_onRamp.applyDestChainConfigUpdates(configArgs);
}
}

0 comments on commit 579dd5a

Please sign in to comment.