Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoscelynFarr committed Apr 24, 2024
1 parent ef16d38 commit 0045afd
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions test/impl/OracleTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,14 @@ contract OperationTest is Test {
assertEq(price, 30_000e6);
}

function testEmergencyOracle() public {
cheats.expectRevert("the emergency oracle is close");
emergency.getAssetPrice();
cheats.expectRevert("the emergency oracle is close");
emergency.getMarkPrice();
}

function testOracleAdaptor() public {
function testOracleAdaptor() public {
oracleAdaptor.turnOnJOJOOracle();
oracleAdaptor.turnOffJOJOOracle();
oracleAdaptor.updateThreshold(6e16);
oracleAdaptor.getMarkPrice();
oracleAdaptor.getChainLinkPrice();
oracleAdaptor.getAssetPrice();
oracleAdaptor.turnOnJOJOOracle();
oracleAdaptor.setMarkPrice(1010e6);
oracleAdaptor.getMarkPrice();
oracleAdaptor.setMarkPrice(120e6);
Expand All @@ -85,4 +81,4 @@ contract OperationTest is Test {
cheats.expectRevert("ETH_ORACLE_HEARTBEAT_FAILED");
jojoOracleAdaptorWstETH4.getAssetPrice();
}
}
}

0 comments on commit 0045afd

Please sign in to comment.