Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
test_RevertIf_NotDelegateCalled
Browse files Browse the repository at this point in the history
  • Loading branch information
0xrajath committed Apr 9, 2024
1 parent 66b34bd commit f10f468
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/rewards-claimer/LlamaRewardsClaimAccountExtension.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {ActionInfo} from "src/lib/Structs.sol";
import {LlamaRewardsClaimAccountExtension} from "src/rewards-claimer/LlamaRewardsClaimAccountExtension.sol";
import {LlamaRewardsClaimGuard} from "src/rewards-claimer/LlamaRewardsClaimGuard.sol";
import {LlamaRewardsClaimStorage} from "src/rewards-claimer/LlamaRewardsClaimStorage.sol";
import {LlamaBaseAccountExtension} from "src/common/LlamaBaseAccountExtension.sol";

contract LlamaRewardsClaimAccountExtensionTest is LlamaRewardsClaimTestSetup {
event ethWithdrawn(address indexed from, address indexed to, uint256 amount);
Expand Down Expand Up @@ -133,4 +134,10 @@ contract ClaimRewards is LlamaRewardsClaimAccountExtensionTest {
vm.expectRevert(expectedErr);
CORE.executeAction(actionInfo);
}

function test_RevertIf_NotDelegateCalled() public {
LlamaRewardsClaimAccountExtension.TargetData[] memory targetData = _setupClaimRewardsData();
vm.expectRevert(LlamaBaseAccountExtension.OnlyDelegateCall.selector);
rewardsClaimAccountExtension.claimRewards(targetData);
}
}

0 comments on commit f10f468

Please sign in to comment.