ЕСОЗ - публічна документація
Approve declaration request online Tests
n/n | Description | Inputs | step by step script | expected result | actual result | actual result FE |
---|---|---|---|---|---|---|
AD-1 | Approve DR in status NEW | DR_id | approve declaration request online | 200 DR status = APPROVED | 200 | |
AD-2 | Approve offline DR in status NEW | DR_id channel=MIS | approve declaration request online | 403 Declaration request should be approved by Doctor | 403 "message": "Declaration request should be approved by Doctor" | |
AD-3 | approve DR not in a NEW status | DR_id status=APPROVED | approve declaration request online | 409 "Wrong declaration request status" | 409 "message": "Invalid transition" | |
AD-4 | approve DR for another person | DR_id DR.data.person <> $.users.person_id | approve declaration request online | 403 - forbidden | 403 - forbidden | |
AD-5 | approve DR with wrong DR id | not correct DR_id | approve declaration request online | 404 Declaration request Id was not found | 404 not_found | |
AD-6 | approve DR w/o scopes | user w/o scopes | approve declaration request online | 403 in case invalid scope(s) | 403 "message": "Your scope does not allow to access this resource. Missing allowances: declaration_request:write" | |
AD-7 | approve DR for doctor with declaration_count >= declaration_limit | DR.data.employee with declaration_count >= declaration_limit | approve declaration request online | 422 - This doctor reaches his limit and could not sign more declarations | ||
AD-8 | approve DR with auth.method=offline | auth.method=offline | approve declaration request online | 403 Declaration request should be approved by Doctor | 403 "message": "Declaration request should be approved by Doctor" | |
AD-9 | approve DR with users.is_blocked=true | users.is_blocked=true | approve declaration request online | 401 User is blocked | 401 "message": "Invalid access token" | |
AD-10 | approve DR with users.tax_id<>person.tax_id | users.tax_id<>person.tax_id | approve declaration request online | 422 | 422 "message": "Invalid person" | |
AD-11 | approve online DR by Doctor | login as Doctor | /api/declaration_requests/{{id}}/actions/approve | 403 Declaration request should be approved by Patient | 403 "message": "Declaration request should be approved by Patient" | |
Ad-12 | approve DR with expired token | token is expired | approve declaration request online | 401 |
ЕСОЗ - публічна документація