Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


n/nDescriptionInputsstep by step scriptexpected resultactual resultactual result FE
AD-1Approve DR in status NEW

DR_id

approve declaration request

200

DR status = APPROVED 



AD-2Approve offline DR in status NEW

DR_id

channel=MIS

approve declaration request

403

Declaration request should be approved by Doctor



AD-3approve DR not in a NEW status

DR_id

status=APPROVED

approve declaration request409  "Wrong declaration request status" 

AD-4approve DR for another person

DR_id

DR.data.person <> $.users.person_id

approve declaration request409 - "Declaration request could not be approved for another person"

AD-5approve DR with wrong DR idnot correct DR_idapprove declaration request404 Declaration request Id was not found

AD-6approve DR w/o scopesuser w/o scopesapprove declaration request403 in case invalid scope(s)

AD-7approve DR for doctor with declaration_count >= declaration_limitDR.data.employee with declaration_count >= declaration_limitapprove declaration request422 - This doctor reaches his limit and could not sign more declarations 

AD-8approve DR with auth.method=offlineauth.method=offlineapprove declaration request

403

Declaration request should be approved by Doctor



AD-9approve DR with users.is_active=falseusers.is_active=falseapprove declaration request422 User is blocked

AD-10approve DR with users.tax_id<>person.tax_id users.tax_id<>person.tax_id approve declaration request403 forbidden