Skip to content

Commit

Permalink
test: add aftermath condition to Protego.drop test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
amusingaxl committed May 14, 2024
1 parent 547473e commit 5d05b7f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Protego.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ contract ProtegoTest is DssTest {

assertFalse(protego.planned(DsSpellLike(badSpells[i].badSpell)));
}

// After Protego loses the hat, it can no longer drop spells
_vote(address(0));
vm.expectRevert();
protego.drop(DsSpellLike(badSpells[0].badSpell));
}

// Test drop anything by lifting Protego to hat
Expand Down Expand Up @@ -243,6 +248,11 @@ contract ProtegoTest is DssTest {

assertFalse(protego.planned(badSpells[i].action, badSpells[i].tag, badSpells[i].sig, badSpells[i].eta));
}

// After Protego loses the hat, it can no longer drop spells
_vote(address(0));
vm.expectRevert();
protego.drop(DsSpellLike(badSpells[0].badSpell));
}

function _vote(address spell_) internal {
Expand Down

0 comments on commit 5d05b7f

Please sign in to comment.