From a57b30c906c6780ac780e44424e7f5b1c30c101e Mon Sep 17 00:00:00 2001 From: tringuyenskymavis Date: Tue, 5 Nov 2024 15:56:11 +0700 Subject: [PATCH] chore: add uint test for transfer 0 ron --- ...ission._allocateCommissionAndTransferToRecipient.t.sol | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/RNSCommission/RNSCommission._allocateCommissionAndTransferToRecipient.t.sol b/test/RNSCommission/RNSCommission._allocateCommissionAndTransferToRecipient.t.sol index a9e3f23..407b9ee 100644 --- a/test/RNSCommission/RNSCommission._allocateCommissionAndTransferToRecipient.t.sol +++ b/test/RNSCommission/RNSCommission._allocateCommissionAndTransferToRecipient.t.sol @@ -71,12 +71,16 @@ contract RNSCommisson__allocateCommissionAndTransferToRecipient_Test is RNSCommi assertEq(random.balance, 0); } - function test_RevertWhen_RonAmount_is_zero() external { + function testConcrete_Success_When_RonAmount_is_zero() external { vm.deal(_senders[0], 1e18); bool sent; - vm.expectRevert(INSCommission.InvalidAmountOfRON.selector); vm.prank(_senders[0]); (sent,) = address(_rnsCommission).call{ value: 0 }(new bytes(0)); + + assertEq(_skyMavisTreasuryAddr.balance, 0); + assertEq(_roninNetworkTreasuryAddr.balance, 0); + assertEq(address(_rnsCommission).balance, 0); + assertEq(_senders[0].balance, 1e18); } }