Versions Compared

Key

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


n/nDescriptionInputsExpected ResultStep by Step ScriptActual Result
CRT1Create
Substance
Innm
  • Authorization - NHS Admin
  • name - New, Valid
  • name_original - New, Valid
  • sctid- new, Valid

Response 201

Substance saved

Innm saved to DB with status is_active=true

  1. Login as NHS Admin
  2. Create Innms
  •   
CRT2Create
substance not
Innm not by NHS Admin
  • Authorisation - Doctor
  • name - New, Valid
  • name_original - New, Valid
sctid
  • sctid - new, Valid

Response 403

Message: Your scope does not allow to access this resource. Missing allowances:

substance

Innm:write"

  1. Login as MIS Admin
  2. Create new Innms not by NHS Admin
  •   
CRT3Create
substance with
Innm with name exists in DB
  • Authorization - NHS Admin
  • name - Old, Valid
  • name_original - New, Valid
sctid
  • sctid - new, Valid

Response

422Message: has already been taken

201

Innm saved to DB with status is_active=true

  1. Login as NHS Admin
  2. Create Innms with same name and different SCTID
  •   
CRT4Create new
substance without
Innm with no valid name
  • Authorization - NHS Admin
  • name - ""
  • name_original - New, Valid
  • sctid - new, Valid

Response 422

message: can't be blank

  1. Login as NHS Admin
  2. Create Innms with empty name
  •   
CRT5Create new
substance without
Innm without name
  • Authorization - NHS Admin
  • name - NO
  • name_original - New, Valid
  • sctid - new, Valid

Responce 422

message: required property name was not present

  1. Login as NHS Admin
  2. Create Innms without name
  •    
CRT6Create
substance without
Innm without scopes
  • Authorization - NO
  • name - New, Valid
  • name_original - New, Valid
  • sctid - new, Valid

Responce 401

message: Authorization header is not set or doesn't contain Bearer token

  1. Login as NHS Admin
  2. Create Innms without scopes
  •   
CRT7Create Innm with no valid name
  • Authorization - NHS Admin
  • name - New, Not Valid (ex. Amiodarone)
  • name_original - New, Valid
  • sctid - new, Valid

Response 422

Message: string does not match pattern \"^[А-Яа-яЁёЇїІіЄєҐґ\\\\- ]*$\"

 
  1. Login as NHS Admin
  2. Create Innms with not valid name
  •   
CRT8Create Innm with no valid name original
  • Authorization - NHS Admin
  • name - New, Valid
  • name_original - New, Not Valid
  • sctid - new, Valid

Response 422

Message: string does not match pattern \"^[a-zA-Z\\\\- ]*$\"

  1. Login as NHS Admin
  2. Create Innms with not valid name original
  •   
CRT9Create Innm with no valid sctid
  • Authorization - NHS Admin
  • name - New, Valid
  • name_original - New, Valid
  • sctid- new, Not Valid

Response 422

Message: string does not match pattern \"^[0-9]{8}$\"

  1. Login as NHS Admin
  2. Create Innms with not valid SCTID
  •   
CRT10Deactivate Innms
  • Authorization - NHS Admin
  • is_active - false

Response 201

Innm updated in DB with status is_active=false

  1. Login as NHS Admin
  2. Update Innm
  •