Skip to content

[BE-123] Unit tests for the dispute module #982

Description

@mftee

Overview

backend/src/dispute/ has 8 files and 2 entities with no tests. Disputes are the project's stated reason for existing, and they encode who may say what about whose land.

Tasks

  • Test dispute creation, including that only eligible parties may raise one against a document.
  • Test the status lifecycle and rejection of invalid transitions.
  • Test access control: a user must not read disputes they are not party to, except for admins.
  • Test evidence attachment and its access rules.
  • Test resolution recording and that a resolved dispute cannot be silently reopened or edited.
  • Target ≥75% coverage.

Acceptance Criteria

  • npm run test -- dispute passes at ≥75% coverage.
  • A non-party is proven unable to read or modify a dispute.
  • Invalid status transitions are rejected.

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions