|
|
|
@ -47,6 +47,7 @@ contract UnaboomerTest is Test {
|
|
|
|
|
// ensure killing increments leaderboard
|
|
|
|
|
function testLeaderboard() public {
|
|
|
|
|
uint256 amt = 20;
|
|
|
|
|
main.toggleMayhem();
|
|
|
|
|
hoax(victim);
|
|
|
|
|
main.radicalizeBoomers{value: unaboomerPrice * amt}(amt);
|
|
|
|
|
startHoax(killer);
|
|
|
|
@ -63,17 +64,18 @@ contract UnaboomerTest is Test {
|
|
|
|
|
|
|
|
|
|
// ensure killing toggles URI
|
|
|
|
|
function testURIToggling() public {
|
|
|
|
|
boomr.setAliveURI('ipfs://alive/');
|
|
|
|
|
boomr.setDeadURI('ipfs://dead/');
|
|
|
|
|
boomr.setBaseURI('ipfs://base/');
|
|
|
|
|
main.toggleMayhem();
|
|
|
|
|
startHoax(victim);
|
|
|
|
|
main.radicalizeBoomers{value: unaboomerPrice}(1);
|
|
|
|
|
assertEq(boomr.tokenURI(1), 'ipfs://alive/1.json');
|
|
|
|
|
assertEq(boomr.tokenURI(1), 'ipfs://base/1.json');
|
|
|
|
|
main.sendBombs(1);
|
|
|
|
|
assertEq(boomr.tokenURI(1), 'ipfs://dead/1.json');
|
|
|
|
|
assertEq(boomr.tokenURI(1), 'ipfs://base/dead.json');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ensure sending bombs burns bombs
|
|
|
|
|
function testBombBurning() public {
|
|
|
|
|
main.toggleMayhem();
|
|
|
|
|
hoax(victim);
|
|
|
|
|
main.radicalizeBoomers{value: unaboomerPrice * 20}(20);
|
|
|
|
|
startHoax(killer);
|
|
|
|
@ -87,6 +89,7 @@ contract UnaboomerTest is Test {
|
|
|
|
|
|
|
|
|
|
// ensure sending bombs doesn't bork
|
|
|
|
|
function testSendBombErrors() public {
|
|
|
|
|
main.toggleMayhem();
|
|
|
|
|
hoax(address(1));
|
|
|
|
|
main.radicalizeBoomers{value: unaboomerPrice * 20}(20);
|
|
|
|
|
hoax(address(2));
|
|
|
|
|