Skip to content

Commit

Permalink
test: add change ownership test
Browse files Browse the repository at this point in the history
  • Loading branch information
CheyenneAtapour committed Jul 31, 2024
1 parent 4c38368 commit dd539c4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/TestGhoBucketCapacitySteward.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pragma solidity ^0.8.0;
import './TestGhoBase.t.sol';

contract TestGhoBucketCapacitySteward is TestGhoBase {
address internal NEW_OWNER = makeAddr('NEW_OWNER');

function setUp() public {
/// @dev Since block.timestamp starts at 0 this is a necessary condition (block.timestamp > `MINIMUM_DELAY`) for the timelocked contract methods to work.
vm.warp(GHO_BUCKET_CAPACITY_STEWARD.MINIMUM_DELAY() + 1);
Expand Down Expand Up @@ -42,6 +44,13 @@ contract TestGhoBucketCapacitySteward is TestGhoBase {
new GhoBucketCapacitySteward(address(0x001), address(0x002), address(0));
}

function testChangeOwnership() public {
assertEq(GHO_BUCKET_CAPACITY_STEWARD.owner(), SHORT_EXECUTOR);
vm.prank(SHORT_EXECUTOR);
GHO_BUCKET_CAPACITY_STEWARD.transferOwnership(NEW_OWNER);
assertEq(GHO_BUCKET_CAPACITY_STEWARD.owner(), NEW_OWNER);
}

function testUpdateFacilitatorBucketCapacity() public {
(uint256 currentBucketCapacity, ) = GHO_TOKEN.getFacilitatorBucket(address(GHO_ATOKEN));
vm.prank(RISK_COUNCIL);
Expand Down

0 comments on commit dd539c4

Please sign in to comment.