From 5198d1d1a2eaf7d3c9ad3740dfe5e098983854cf Mon Sep 17 00:00:00 2001 From: nelson-pereira8 <94120714+nican0r@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:04:33 -0300 Subject: [PATCH] test: test_claimForInitiative_unregistered_initiative --- test/Governance.t.sol | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/Governance.t.sol b/test/Governance.t.sol index 90922565..d9227f13 100644 --- a/test/Governance.t.sol +++ b/test/Governance.t.sol @@ -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);