Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
n/nDescriptionInputsExpected ResultStep by Step ScriptActual Result

Create Substance
  • Authorization - NHS Admin
  • name - New, Valid
  • name_original - New, Valid
  • stdidsctid- new

Response 201

Substance saved to DB with status is_active=true


  •   

Create substance not by NHS Admin
  • Authorisation - Doctor
  • name - New, Valid
  • name_original - New, Valid
  • stdidsctid- new

Response 403

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


  •   

Create substance with name exists in DB
  • Authorization - NHS Admin
  • name - Old, Valid
  • name_original - New, Valid
  • stdidsctid- new

Response 422

Message: has already been taken


  •   

Create new substance without name
  • Authorization - NHS Admin
  • name - ""
  • name_original - New, Valid
  • sctid- new

Response 422

message: can't be blank


  •   

Create new substance without name
  • Authorization - NHS Admin
  • name - NO
  • name_original - New, Valid
  • sctid- new

Responce 422

message: required property name was not present


  •    

Create substance without scopes
  • Authorization - NO
  • name - New, Valid
  • name_original - New, Valid
  • sctid- new

Responce 401

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


  •