From 0045afd1380f6fb690ebb4a386d27490eeb920a9 Mon Sep 17 00:00:00 2001 From: JoscelynFarr Date: Wed, 24 Apr 2024 17:17:31 +0800 Subject: [PATCH] add test --- test/impl/OracleTest.t.sol | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/test/impl/OracleTest.t.sol b/test/impl/OracleTest.t.sol index e39ebd4..db26f70 100644 --- a/test/impl/OracleTest.t.sol +++ b/test/impl/OracleTest.t.sol @@ -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); @@ -85,4 +81,4 @@ contract OperationTest is Test { cheats.expectRevert("ETH_ORACLE_HEARTBEAT_FAILED"); jojoOracleAdaptorWstETH4.getAssetPrice(); } -} +} \ No newline at end of file