n/n | description | inputs | expected result | actual result |
---|---|---|---|---|
CCR1 | Create Contract Request |
| 200, created contract request | 200, there is no validation for id_form external_contractors incorrect saved to DB:
contractor_employees incorrect saved to DB |
CCR2 | Create contract request without external_contractors_flag and with external_contractors |
| 422, external_contractors_flag | 422, Invalid external_contractor_flag |
CCR2.1 | Create contract request with external_contractors_flag and with empty external_contractors |
| 422, array shouldn't be empty | 200 |
CCR2.2 | Create contract request with external_contractors_flag =false and without extrenal_contractors |
| 200 | 200 |
CCR2.3 | Create contract request with extrenal_contractors in division which doesn't belong to contract |
| 422, The division is not belong to contractor_employee_divisions | 422, The division is not belong to contractor_employee_divisions |
CCR3 | Create Contract Request with doctor_token |
| 403, invalid access token | 403, Your scope does not allow to access this resource. Missing allowances: contract_request:create |
CCR4 | Create contract request without scope |
| 403 | 403, Your scope does not allow to access this resource. Missing allowances: contract_request:create |
CCR5 | Create contract request with owner in other legal entity |
| 403 | 422, Contractor owner must be active within current legal entity in contract request |
CCR6 | Create contract request with DISMISSED owner |
|
| 422 | |||
CCR7 | Create contract request with info from nhs side |
| 422 | 422, schema does not allow additional properties |
CCR8 | contract request with invalid start_date | start_date='2020-01-01' | 422 | 422, Start date must be within this or next year |
CCR8.1 | contract request with invalid start_date | start_date=today-1 | 422 | 422, Start date must be greater than create date |
CCR9 | contract request with invalid end_date | "start_date": "2019-05-08", "end_date |
": "2020-04-20", | 422 | 422, The year of start_date and and date must be equal | ||
CCR9.1 | contract request with invalid end_date | end_date<start_date: "start_date": "2019-05-06", | 422,End date must be greater than start date | 200 |
CCR10 | Contractor_employee_division with dismissed doctor | contractor_employee_divisions.employee_id.status='DISMISSED' | 422, employee | 422, Employee must be active DOCTOR with linked division |
CCR11 | Contractor_employee_division with inactive division | contractor_employee_divisions.division_id.status=INACTIVE | 422, division | 422, Division must be active and within current legal_entity |
CCR12 | Contractor_employee_division with doctor and different division | contractor_employee_divisions:
| 422 | 422, Employee must be within current division |
CCR12 | Update contract using contract_number | active contract by contract_number |
200 | |||
CCR13 | Update contract using terminated contract_number | terminated contract by contract_number | 422 |
CCR14 | Create Contract Request within same dates as existing contract request |
|
|
| ||||
CCR15 | Create Contract Request within same dates as existing contract request |
| 200, previous request in status=SIGNED | |