Skip to content

Commit

Permalink
chore: increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
fedealconada committed Jan 27, 2024
1 parent 143e9e9 commit 7e94f9e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/KintoWalletFactory.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,28 @@ contract KintoWalletFactoryTest is SharedSetup {
assertEq(address(_kintoWallet), address(_kintoWalletAfter));
}

function testCreateAccount_RevertWhen_ZeroAddress() public {
vm.prank(address(_owner));
vm.expectRevert("invalid addresses");
_kintoWallet = _walletFactory.createAccount(address(0), _owner, 0);

vm.prank(address(_owner));
vm.expectRevert("invalid addresses");
_kintoWallet = _walletFactory.createAccount(_owner, address(0), 0);
}

function testCreateAccount_RevertWhen_OwnerNotKYCd() public {
vm.prank(address(_user2));
vm.expectRevert("KYC required");
_kintoWallet = _walletFactory.createAccount(_user2, _owner, 0);
}

function testCreateAccount_RevertWhen_OwnerAndSenderMismatch() public {
vm.prank(address(_owner));
vm.expectRevert("KYC required");
_kintoWallet = _walletFactory.createAccount(_user2, _owner, 0);
}

/* ============ Upgrade tests ============ */

function testUpgradeTo() public {
Expand Down

0 comments on commit 7e94f9e

Please sign in to comment.