Skip to content

Commit

Permalink
fix: outdated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moebius committed Nov 29, 2023
1 parent ce7c01c commit 856e4f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ contract BondEscalationModule_Unit_DisputeResponse is BaseTest {
mockDispute.responseId = _responseId;

// Warp to a time after the disputeWindow is over.
vm.warp(block.timestamp + _disputeWindow + 1);
vm.roll(block.number + _disputeWindow + 1);

// Mock and expect IOracle.createdAt to be called
_mockAndExpect(address(oracle), abi.encodeCall(IOracle.createdAt, (_responseId)), abi.encode(1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ contract BondedResponseModule_Unit_FinalizeRequest is BaseTest {
_disputeWindow = bound(_disputeWindow, 61, 365 days);

// Check correct calls are made if deadline has passed
uint256 _deadline = block.timestamp;
uint256 _deadline = block.number;
mockRequest.responseModuleData = abi.encode(accounting, _token, _bondSize, _deadline, _disputeWindow);
bytes32 _requestId = _getId(mockRequest);
mockResponse.requestId = _requestId;
Expand All @@ -258,9 +258,7 @@ contract BondedResponseModule_Unit_FinalizeRequest is BaseTest {
);

// Mock and expect IOracle.createdAt to be called
_mockAndExpect(
address(oracle), abi.encodeCall(IOracle.createdAt, (_getId(mockResponse))), abi.encode(block.timestamp)
);
_mockAndExpect(address(oracle), abi.encodeCall(IOracle.createdAt, (_getId(mockResponse))), abi.encode(block.number));

// Mock and expect IAccountingExtension.release to be called
_mockAndExpect(
Expand All @@ -273,7 +271,7 @@ contract BondedResponseModule_Unit_FinalizeRequest is BaseTest {
vm.expectEmit(true, true, true, true, address(bondedResponseModule));
emit RequestFinalized({_requestId: _getId(mockRequest), _response: mockResponse, _finalizer: address(this)});

vm.warp(block.timestamp + _disputeWindow);
vm.roll(block.number + _disputeWindow);

vm.prank(address(oracle));
bondedResponseModule.finalizeRequest(mockRequest, mockResponse, address(this));
Expand Down

0 comments on commit 856e4f5

Please sign in to comment.