diff --git a/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol b/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol index 35ff50e..8f4a0ca 100644 --- a/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol +++ b/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol @@ -8,7 +8,7 @@ import {Helpers} from '../../../utils/Helpers.sol'; import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IAccessController.sol'; import {IModule} from '@defi-wonderland/prophet-core/solidity/interfaces/IModule.sol'; -import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; +import {IOracle, IOracleAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; import {IAccessModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/accessControl/IAccessModule.sol'; import {ValidatorLib} from '@defi-wonderland/prophet-core/solidity/libraries/ValidatorLib.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; @@ -1532,6 +1532,13 @@ contract BondEscalationModule_Unit_AccessControl is BaseTest { uint256 _numAgainstPledgers = _numForPledgers + 1; _setBondEscalation(_requestId, _numForPledgers, _numAgainstPledgers); + // expect a call checking whether the access module has been approved by the user + _mockAndExpect( + address(oracle), + abi.encodeCall(IOracleAccessController.isAccessModuleApproved, (_user, _accessModule)), + abi.encode(true) + ); + IAccessController.AccessControl memory _accessControl = IAccessController.AccessControl({user: _user, data: _data}); // Mock and expect call to access control module @@ -1590,6 +1597,13 @@ contract BondEscalationModule_Unit_AccessControl is BaseTest { _setBondEscalation(_requestId, _numForPledgers, _numAgainstPledgers); + // todo: extract to helper when we add tests for the other access controlled functions + _mockAndExpect( + address(oracle), + abi.encodeCall(IOracleAccessController.isAccessModuleApproved, (_user, _accessModule)), + abi.encode(true) + ); + _mockAndExpect( address(_params.accountingExtension), abi.encodeCall(