n/n | description | inputs | expected result | actual result |
---|---|---|---|---|
CCR1 | Create Contract Request |
| 200, created contract request | 200,
|
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 | 422 |
CCR2.2 | Create contract request with external_contractors_flag =false and without external_contractors |
| 200 | 200, |
CCR2.3 | Create contract request with external_contractors in division which doesn't belong to contract divisions |
| 422, The division is not belong to contractor_divisions | 422 |
CCR2.4 | Create contract request with employee_divisions with division which doesn't belong to contract divisions |
| 422, The division is not belong to contractor_divisions | 422 |
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 contractor_owner from other legal entity |
| 403 | 422, Contractor owner must be active within current legal entity in contract request |
CCR6 | Create contract request with DISMISSED contractor_owner |
| 422 | 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 | 422 |
CCR10 | Contractor_employee_division with dismissed doctor | contractor_employee_divisions.employee_id.status='DISMISSED' | 422, employee | 422, Employee must be active DOCTOR |
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:
| 200 | 200 |
CCR13 | Update contract using contract_number | active contract by contract_number, all fields filled according to business rules | 200 | 200 |
CCR14 | Update contract using contract_number that doesn't exist | contract_number that doesn't exist | 422 | 422, Contract with such contract number does not exist |
CCR15 | Update contract using terminated contract_number | terminated contract by contract_number | 422 | 422, There is no active contract with such contract_number |
CCR16 | Update contract without contractor_employee_divisions | contractor_employee_divisions blank | 422 200 | 422, required property contractor_employee_divisions was not present |
CCR17 | Update contract within start_date | start_date | 422 | 422, Start date can't be updated via Contract Request |
CCR18 | Update contract within end_date | end_date | 422 | 422, End date can't be updated via Contract Request |
CCR19 | Create Contract Request within same dates as existing contract request |
|
|
|
CCR20 | Create Contract Request within same dates as existing contract request |
| 200, previous request in status=SIGNED | 200, previous request in status=SIGNED |
CCR21 | Create Contract Request signed by not matching token DRFO |
|
...