Skip to content

Commit

Permalink
Merge pull request ubiquity#857 from gitcoindev/forge-test-twap-oracl…
Browse files Browse the repository at this point in the history
…e-facet-increase-coverage

add test_setPoolRevertsWhenFirstAddressIsNotDollarToken test case
  • Loading branch information
gitcoindev authored Dec 24, 2023
2 parents f4cc20b + 597b7db commit e160bf5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/contracts/test/diamond/facets/TWAPOracleFacet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ contract TWAPOracleDollar3poolFacetTest is DiamondTestSetup {
);
}

function test_setPoolRevertsWhenFirstAddressIsNotDollarToken() public {
metaPoolAddress = address(
new MockMetaPool(curve3CRVTokenAddress, address(dollarToken))
);
vm.prank(owner);
vm.expectRevert("TWAPOracle: FIRST_COIN_NOT_DOLLAR");
twapOracleDollar3PoolFacet.setPool(
metaPoolAddress,
curve3CRVTokenAddress
);
}

function test_overall() public {
// set the mock data for meta pool
uint256[2] memory _price_cumulative_last = [
Expand Down

0 comments on commit e160bf5

Please sign in to comment.