You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
// SPDX-License-Identifier: UNLICENSED
|
|
|
|
pragma solidity ^0.8.13;
|
|
|
|
|
|
|
|
import "forge-std/Test.sol";
|
|
|
|
import "../src/Unaboomer.sol";
|
|
|
|
|
|
|
|
contract UnaboomerTest is Test {
|
|
|
|
Unaboomer public boomr;
|
|
|
|
|
|
|
|
function setUp() public {
|
|
|
|
boomr = new Unaboomer();
|
|
|
|
}
|
|
|
|
|
|
|
|
function testWithdraws() public {
|
|
|
|
vm.deal(address(boomr), 11 ether);
|
|
|
|
vm.prank(address(boomr.owner()));
|
|
|
|
boomr.withdraw();
|
|
|
|
assertEq(boomr.owner().balance > 10 ether, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
function testMint() public {
|
|
|
|
vm.startPrank(address(1));
|
|
|
|
boomr.mint(5);
|
|
|
|
assertEq(boomr.totalSupply(), 5);
|
|
|
|
assertEq(boomr.tokenDead(1), false);
|
|
|
|
}
|
|
|
|
}
|