Skip to content

Commit

Permalink
delete unused error and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xble committed Feb 16, 2024
1 parent b2ca09c commit 8b67ebb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
1 change: 0 additions & 1 deletion contracts/distribution/PushDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ contract PushDistributor {
event Distributed(Party party, IERC20 token, address[] members, uint256 amount);

error NotEnoughETH(uint256 expectedAmount, uint256 receivedAmount);
error UnexpectedETH(uint256 amount);
error WrongProposalId(uint256 proposalId);
error WrongMembers();
error MembersNotSorted();
Expand Down
21 changes: 18 additions & 3 deletions test/distribution/PushDistributor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,12 @@ contract PushDistributorTest is SetupPartyHelper {

uint256 proposalId = _proposeAndPassProposal(proposal);

vm.expectRevert();
vm.expectRevert(
abi.encodeWithSelector(
ArbitraryCallsProposal.ArbitraryCallFailedError.selector,
abi.encodeWithSelector(PushDistributor.WrongProposalId.selector, 2)
)
);
_executeProposal(proposalId, proposal);
}

Expand Down Expand Up @@ -353,7 +358,12 @@ contract PushDistributorTest is SetupPartyHelper {

uint256 proposalId = _proposeAndPassProposal(proposal);

vm.expectRevert();
vm.expectRevert(
abi.encodeWithSelector(
ArbitraryCallsProposal.ArbitraryCallFailedError.selector,
abi.encodePacked(PushDistributor.MembersNotSorted.selector)
)
);
_executeProposal(proposalId, proposal);
}

Expand Down Expand Up @@ -388,7 +398,12 @@ contract PushDistributorTest is SetupPartyHelper {

uint256 proposalId = _proposeAndPassProposal(proposal);

vm.expectRevert();
vm.expectRevert(
abi.encodeWithSelector(
ArbitraryCallsProposal.ArbitraryCallFailedError.selector,
abi.encodePacked(PushDistributor.WrongMembers.selector)
)
);
_executeProposal(proposalId, proposal);

// Add the last member back and pass
Expand Down

0 comments on commit 8b67ebb

Please sign in to comment.