Skip to content

Commit

Permalink
feat: monkey patch non-100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre committed Apr 9, 2024
1 parent 263e6c5 commit 3ab9540
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions foundry/test/FoxStaking.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,41 +29,6 @@ contract FOXStakingTestRuneAddress is Test {
foxStaking = new FoxStaking(address(foxToken));
}

function testCanSetRuneAddress() public {
vm.startPrank(user);

string memory newRuneAddress = "thor17gw75axcnr8747pkanye45pnrwk7p9c3cqncsv";

foxStaking.setRuneAddress(newRuneAddress);

(, , , string memory runeAddress) = foxStaking.stakingInfo(user);
assertEq(runeAddress, newRuneAddress, "setRuneAddress should update the rune address when called by the owner");

vm.stopPrank();
}

function testCannotSetInvalidLengthRuneAddress() public {
vm.startPrank(user);

string memory invalidLengthRuneAddress = "thor1234";

vm.expectRevert("Rune address must be 43 characters");
foxStaking.setRuneAddress(invalidLengthRuneAddress);

vm.stopPrank();
}

function cannotStakeWithEmptyRuneAddress() public {
vm.startPrank(user);

string memory emptyRuneAddress = "";

vm.expectRevert("Rune address cannot be empty");
foxStaking.stake(1e18, emptyRuneAddress);

vm.stopPrank();
}

function cannotStakeWithInvalidLengthRuneAddress() public {
vm.startPrank(user);

Expand Down

0 comments on commit 3ab9540

Please sign in to comment.