Skip to content

Commit

Permalink
test: fix disputeId > 0 (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xng authored Jun 16, 2023
1 parent 603ac71 commit e527edb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions solidity/test/unit/BondEscalationModule.t.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.19;

//TODO: improve natspec -- cursed
// solhint-disable-next-line
import 'forge-std/Test.sol';

Expand Down Expand Up @@ -326,6 +327,7 @@ contract BondEscalationModule_UnitTest is Test {
function test_escalateDisputeEscalateTiedDispute(bytes32 _disputeId, bytes32 _requestId) public {
// Assume _requestId is not zero
vm.assume(_requestId > 0);
vm.assume(_disputeId > 0);

// Creates a fake dispute and mocks Oracle.getDispute to return it when called.
_mockDispute(_disputeId, _requestId);
Expand Down Expand Up @@ -415,6 +417,7 @@ contract BondEscalationModule_UnitTest is Test {
function test_escalateDisputeEscalateNormalDisputeDuringTyingBuffer(bytes32 _disputeId, bytes32 _requestId) public {
// Assume _requestId is not zero
vm.assume(_requestId > 0);
vm.assume(_disputeId > 0);

// Creates a fake dispute and mocks Oracle.getDispute to return it when called.
_mockDispute(_disputeId, _requestId);
Expand All @@ -431,9 +434,6 @@ contract BondEscalationModule_UnitTest is Test {
// Populate the requestData for the given requestId
_setRequestData(_requestId, bondSize, maxEscalations, _bondEscalationDeadline, _tyingBuffer);

// Set bond escalation status to None, meaning no proposed answer was disputed before the bond escalation deadline.
bondEscalationModule.forTest_setBondEscalationStatus(_requestId, IBondEscalationModule.BondEscalationStatus.None);

// Expect Oracle.getDispute to be called.
vm.expectCall(address(oracle), abi.encodeCall(IOracle.getDispute, (_disputeId)));

Expand Down

0 comments on commit e527edb

Please sign in to comment.