Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ezynda3 committed Feb 24, 2025
1 parent 8e7722c commit 851c91e
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions test/solidity/Periphery/ReceiverChainflip.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ contract ReceiverChainflipTest is TestBase {

event ExecutorSet(address indexed executor);

function testRevert_WhenConstructedWithZeroAddresses() public {
// Test zero owner address
vm.expectRevert(InvalidConfig.selector);
new ReceiverChainflip(address(0), address(executor), chainflipVault);

// Test zero executor address
vm.expectRevert(InvalidConfig.selector);
new ReceiverChainflip(address(this), address(0), chainflipVault);

// Test zero chainflip vault address
vm.expectRevert(InvalidConfig.selector);
new ReceiverChainflip(address(this), address(executor), address(0));
}

function setUp() public {
customBlockNumberForForking = 18277082;
initTestBase();
Expand All @@ -63,7 +49,19 @@ contract ReceiverChainflipTest is TestBase {
vm.label(address(erc20Proxy), "ERC20Proxy");
}

// AI! add a test that makes sure we revert when constructing with zero address. Check each arg. Make sure to import InvalidConfig from GenericErrors
function testRevert_WhenConstructedWithZeroAddresses() public {
// Test zero owner address
vm.expectRevert(InvalidConfig.selector);
new ReceiverChainflip(address(0), address(executor), chainflipVault);

// Test zero executor address
vm.expectRevert(InvalidConfig.selector);
new ReceiverChainflip(address(this), address(0), chainflipVault);

// Test zero chainflip vault address
vm.expectRevert(InvalidConfig.selector);
new ReceiverChainflip(address(this), address(executor), address(0));
}

function test_ContractIsSetUpCorrectly() public {
receiver = new ReceiverChainflip(
Expand Down

0 comments on commit 851c91e

Please sign in to comment.