n/n | Description | Test Case Inputs | Expected Result | Step by step Script | Actual Result |
---|
CIT1 | Create INNM | - Authorization = NHS Admin
- name - valid
- form = valid
- Substance
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
| Response 200 INNMS created. Saved to DB | - Login as NHS Admin
- Create innm copy
| |
CIT2 | Create INNM with 0 ingredients | - Authorization = NHS Admin
- name - valid
- form = valid
- Substance
- id - active
- Numerator unit - true
- Numerator value = 0
- Denumerator unit - true
- Denumerator value = 0
- is active - true
| Response 422 message: expected the value to be > 0 | - Login as NHS Admin
- Create INNM with 0 ingredients
| |
CIT3 | Create innm with not active substance | - Authorization = NHS Admin
- name - valid
- form = valid
- Substance
- id - NOT active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
| Response 422 message: "Substance in ingredients must be active!" | - Login as NHS Admin
- Create innm with not active substance
| |
CIT4 | Create innm with 2 is_active_subst ingredients | - Authorization = NHS Admin
- name - valid
- form = valid
- Substance
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
- Substance
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
| Response 422 message: "One of ingredients must be is active substance!" | - Login as NHS Admin
- Create innm with 2 is_active_subst ingredients
| |
CIT5 | Create innm 1 ingredient and is_active_substance=false | - Authorization = NHS Admin
- name - valid
- form = valid
- Substance
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - false
| Response 422 message: "One of ingredients must be is active substance!" | - Login as NHS Admin
- Create innm 1 ingredient and is_active_substance=false
| |
CIT6 | Create innm with 2 ingredients is_active=true & is_active=false | - Authorization = NHS Admin
- name - valid
- form = valid
- Substance
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
- Substance
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - false
| Response 201 INNM created. Saved to DB
| - Login as NHS Admin
- Create innm with 2 ingredients
| |
CIT7 | Create innm with 2 ingredients with the same id | - Authorization = NHS Admin
- name - valid
- form = valid
- Substance
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
- Substance
- id - active, the same
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - false
| Response 422 | - Login as NHS Admin
- Create innm with 2 ingredients with the same id
| |
CIT8 | Create innm not by NHS Admin | - Authorization = NHS Admin
- name - valid
- form = valid
- Substance
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
| Response 403 Message: Your scope does not allow to access this resource. Missing allowances: innm:write | | |
CIT9 | Deactivate INNM | - Authorization = NHS Admin
- INNM_id - Active
| Response 201 | - Login as NHS Admin
- Deactivate INNM
| |
CIT10 | Deactivate not active INNM | - Authorization = NHS Admin
- INNM_id - NOT Active
| Response 404 | - Login as NHS Admin
- Deactivate not active INNM
| |
CIT11 | Deactivate INNM with active medication | - Authorization = NHS Admin
- Create INNM
- Create Medication
- Deactivate INNM
| Response 404 | - Login as NHS Admin
- Create innm to deactivate
- Create medication to deactivate innm
- Deactivate INNM with active medication
| |