Reject requisition endpoint should only work on authorized requsitions

Description

Rejecting a requisition should only work, when the requisition is waiting for approval. In any other case the endpoint should not move the requisition back to initiated state. Please add a unit test to verify this.

Acceptance criteria:

  • Rejecting a requisition works only for authorized requisition (changes its status to initiated but leaves all other fields intact)

  • Rejecting a requisition in any other state should not work - it should leave the requisition intact and return an error message

Environment

None

Status

Assignee

Sebastian Brudziński

Reporter

Sebastian Brudziński

Labels

None

Epic Link

Sprint

None

Fix versions

Priority

Major
Configure