-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(pool-monitor): add pool monitor initial test
- Loading branch information
1 parent
281ca33
commit 32237f5
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
packages/contracts/test/dollar/monitors/PoolLiquidityMonitorTest.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import "forge-std/Test.sol"; | ||
import "../../../src/dollar/monitors/PoolLiquidityMonitor.sol"; | ||
import "../../helpers/LocalTestHelper.sol"; | ||
|
||
contract PoolLiquidityMonitorTest is LocalTestHelper { | ||
PoolLiquidityMonitor monitor; | ||
address defenderRelayer = address(0x456); | ||
|
||
function setUp() public override { | ||
super.setUp(); | ||
|
||
monitor = new PoolLiquidityMonitor( | ||
address(ubiquityPoolFacet), | ||
defenderRelayer | ||
); | ||
} | ||
|
||
function testInitialSetup() public { | ||
assertEq(monitor.defenderRelayer(), defenderRelayer); | ||
} | ||
|
||
function testSetDefenderRelayer() public { | ||
address newRelayer = address(0x789); | ||
|
||
monitor.setDefenderRelayer(newRelayer); | ||
|
||
assertEq(monitor.defenderRelayer(), newRelayer); | ||
} | ||
} |