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.

37 lines
1.0 KiB
Solidity

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "forge-std/Test.sol";
2 years ago
import {UnaboomerCommon} from "../src/UnaboomerCommon.sol";
2 years ago
import {Unaboomer} from "../src/Unaboomer.sol";
import {Mailbomb} from "../src/Mailbomb.sol";
contract UnaboomerTest is Test {
2 years ago
UnaboomerCommon public main;
Unaboomer public boomr;
2 years ago
Mailbomb public bomb;
function setUp() public {
2 years ago
main = new UnaboomerCommon();
boomr = new Unaboomer();
2 years ago
bomb = new Mailbomb();
2 years ago
boomr.setMainContract(address(main));
bomb.setMainContract(address(main));
main.setUnaboomerContract(address(boomr));
main.setMailbombContract(address(bomb));
}
function testWithdraws() public {
2 years ago
vm.deal(address(main), 10 ether);
vm.prank(address(main.owner()));
main.withdraw();
}
function testMint() public {
2 years ago
hoax(address(1));
2 years ago
main.radicalizeBoomers{value: 0.05 ether}(5);
assertEq(boomr.totalSupply(), 5);
assertEq(boomr.tokenDead(1), false);
}
}