Skip to content

Commit

Permalink
Errors reordering
Browse files Browse the repository at this point in the history
404 moved after 403
  • Loading branch information
FabrizioMoggio authored Jul 16, 2024
1 parent ee8b2d0 commit e43a95c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,6 @@ Feature: CAMARA Call Fowarwing Signal API, v0.1.0 - Operation call-forwardings

# Error path scenarios

# Generic 404 error - unknown phone number
@call_forwarding_signal_03_unconditional_call_forwarding_for_unknown_phone_number
Scenario: retrieve call forwarding signal on a properly formatted phone number unknown by the network
Given the request body property "$.phoneNumber" is set to a valid phone number for which the call forwarding status could not be retrieved
And the request body is set to a valid request body
And "login_hint" is set to a valid phone number supported by the service with the same value as "$.phoneNumber", if valorised.
When the HTTP "POST" request is sent
Then the response status code is 404
And the response property "$.code" is "CALL_FORWARDING.UNKNOWN_PHONE_NUMBER"
And the response property "$.message" contains a user friendly text

# Generic 400 error - input error
@call_forwarding_signal_400.1_no_request_body
Scenario: Missing request body
Expand Down Expand Up @@ -163,6 +152,17 @@ Feature: CAMARA Call Fowarwing Signal API, v0.1.0 - Operation call-forwardings
And the response property "$.status" is 403
And the response property "$.code" is "INVALID_TOKEN_CONTEXT"
And the response property "$.message" contains a user friendly text

# Generic 404 error - unknown phone number
@call_forwarding_signal_03_unconditional_call_forwarding_for_unknown_phone_number
Scenario: retrieve call forwarding signal on a properly formatted phone number unknown by the network
Given the request body property "$.phoneNumber" is set to a valid phone number for which the call forwarding status could not be retrieved
And the request body is set to a valid request body
And "login_hint" is set to a valid phone number supported by the service with the same value as "$.phoneNumber", if valorised.
When the HTTP "POST" request is sent
Then the response status code is 404
And the response property "$.code" is "CALL_FORWARDING.UNKNOWN_PHONE_NUMBER"
And the response property "$.message" contains a user friendly text

# Generic 409 error - conflict
@call_forwarding_signal_409.1_already_exists
Expand Down
22 changes: 11 additions & 11 deletions code/Test_definitions/call-forwarding-signal-unconditional.feature
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,6 @@ Feature: CAMARA Call Fowarwing Signal API, v0.1.0 - Operation unconditional-cal

# Error path scenarios

# Generic 404 error - unknown phone number
@call_forwarding_signal_03_unconditional_call_forwarding_for_unknown_phone_number
Scenario: retrieve call forwarding signal on a properly formatted phone number unknown by the network
Given the request body property "$.phoneNumber" is set to a valid phone number for which the unconditional call forwarding status could not be retrieved
And the request body is set to a valid request body
And "login_hint" is set to a valid phone number supported by the service with the same value as "$.phoneNumber", if valorised.
When the HTTP "POST" request is sent
Then the response status code is 404
And the response property "$.code" is "CALL_FORWARDING.UNKNOWN_PHONE_NUMBER"
And the response property "$.message" contains a user friendly text

# Generic 400 error - input error
@call_forwarding_signal_400.1_no_request_body
Scenario: Missing request body
Expand Down Expand Up @@ -129,6 +118,17 @@ Feature: CAMARA Call Fowarwing Signal API, v0.1.0 - Operation unconditional-cal
And the response property "$.status" is 403
And the response property "$.code" is "INVALID_TOKEN_CONTEXT"
And the response property "$.message" contains a user friendly text

# Generic 404 error - unknown phone number
@call_forwarding_signal_03_unconditional_call_forwarding_for_unknown_phone_number
Scenario: retrieve call forwarding signal on a properly formatted phone number unknown by the network
Given the request body property "$.phoneNumber" is set to a valid phone number for which the unconditional call forwarding status could not be retrieved
And the request body is set to a valid request body
And "login_hint" is set to a valid phone number supported by the service with the same value as "$.phoneNumber", if valorised.
When the HTTP "POST" request is sent
Then the response status code is 404
And the response property "$.code" is "CALL_FORWARDING.UNKNOWN_PHONE_NUMBER"
And the response property "$.message" contains a user friendly text

# Generic 409 error - conflict
@call_forwarding_signal_409.1_already_exists
Expand Down

0 comments on commit e43a95c

Please sign in to comment.