ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Current »

n/n
Description
Inputs
expected result
actual  result
expected result GraphQLactual result GraphQL
1Update Assignee without scope
  • token
  • id
  • json
403403, Your scope does not allow to access this resource. Missing allowances: contract_request:update

2Update Assignee with Contract Request status<>'NEW/IN_PROCESS'
  • token 
  • id request in status<>'NEW/IN_PROCESS'
409, Incorrect status of contract_request to modify it409, Incorrect status of contract_request to modify it
{
"data": {
"assignContractRequest": null
},
"errors": [
{
"extensions": {
"code": "CONFLICT"
},
"message": "Incorrect status of contract_request to modify it",
"path": [
"assignContractRequest"]}]}
3Update Assignee with non existing contract request 
  • token 
  • non existing id
404
404, not found


4Update Assignee with not valid  contract request ID
  • token
  • not valid contract request ID
403 403, forbidden
"errors": [
{
"extensions": {
"code": "NOT_FOUND"
},
"message": "Employee not found",
"path": [
"assignContractRequest"]}]
5Assign employee from another LE
  • token
  • id
  • incorrect employee_id
422, 'Invalid legal entity id'

422, Employee doesn't belong to legal_entity


"errors": [
{
"extensions": {
"code": "UNPROCESSABLE_ENTITY"
},
"message": "Invalid legal entity id",
"path": [
"assignContractRequest"]}]}
6Assign dismissed employee
  • token
  • id
  • incorrect employee status

409, Invalid employee status

409, Employee must be active


"errors": [
{
"extensions": {
"code": "CONFLICT"
},
"message": "Invalid employee status",
"path": [
"assignContractRequest"]}]
7Assign employee who doesn't have required role 
  • token
  • id
  • incorrect employee role
403, 'Employee doesn't have required role'403, Employee doesn't have required role
"errors": [
{
"extensions": {
"code": "FORBIDDEN"
},
"message": "FORBIDDEN",
"path": [
"assignContractRequest"
]
8Assign valid employee for valid request 
  • token
  • id
  • assignee_id

200, status = 'IN_PROCESS',

event added to event_manager

200, IN_PROCESS


200
9Reassign another valid employee
  • token
  • id
  • assignee_id
 

200, status = 'IN_PROCESS',

event added to event_manager

 

200, IN_PROCESS


200
10Send empty json
  • token
  • id
422, required property employee_id was not present422, required property employee_id was not present
{
"message": "Argument \"input\" has invalid value $input.\nIn field \"id\": Expected type \"ID!\", found null.\nIn field \"employeeId\": Expected type \"ID!\", found null."]
}
  • No labels