Skip to content

Commit

Permalink
test: test_claimForInitiative_unregistered_initiative
Browse files Browse the repository at this point in the history
  • Loading branch information
nican0r committed Oct 18, 2024
1 parent d4c23e7 commit 5198d1d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/Governance.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,20 @@ contract GovernanceTest is Test {
vm.stopPrank();
}

// claiming for an unregistered initiative doesn't revert
function test_claimForInitiative_unregistered_initiative() public {
vm.startPrank(user);

address userProxy = governance.deployUserProxy();

// passes in user address as governance, allowing them to call privileged functions
address maliciousInitiative = address(new BribeInitiative(user, address(lusd), address(lqty)));

governance.claimForInitiative(maliciousInitiative);

vm.stopPrank();
}

// this shouldn't happen
function off_claimForInitiativeEOA() public {
address EOAInitiative = address(0xbeef);
Expand Down

0 comments on commit 5198d1d

Please sign in to comment.