Skip to content

Commit

Permalink
fix: unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Reinis Martinsons <[email protected]>
  • Loading branch information
Reinis-FRP committed May 9, 2024
1 parent 547755e commit 0c6aae5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/unit/Oval.ChainlinkDestinationAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ contract OvalChainlinkDestinationAdapter is CommonTest {
oval.latestRoundData();

// Check that Oval return the correct values scaled to the source oracle decimals.
assertTrue(roundId == 1);
assertTrue(roundId == 2);
assertTrue(answer == newAnswer / internalDecimalsToSourceDecimals);
assertTrue(startedAt == newTimestamp);
assertTrue(updatedAt == newTimestamp);
assertTrue(answeredInRound == 1);
assertTrue(answeredInRound == 2);
}
}
4 changes: 3 additions & 1 deletion test/unit/Oval.UniswapAnchoredViewDestinationAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ contract OvalUniswapAnchoredViewDestinationAdapter is CommonTest {
destinationAdapter.setOval(cTokenAddress, OvalAddress);

vm.mockCall(
OvalAddress, abi.encodeWithSelector(IOval.internalLatestData.selector), abi.encode(newAnswer, newTimestamp)
OvalAddress,
abi.encodeWithSelector(IOval.internalLatestData.selector),
abi.encode(newAnswer, newTimestamp, 1)
);
uint256 underlyingPrice = destinationAdapter.getUnderlyingPrice(cTokenAddress);

Expand Down

0 comments on commit 0c6aae5

Please sign in to comment.