Unverified Commit d75d34e9 authored by Dan Jones's avatar Dan Jones
Browse files

feat: add tests for publish retry on 403

parent 2a22ae98
......@@ -16,3 +16,24 @@ Feature: Can the adapter publish messages?
When a mock send API response is configured to return an error
When the publish method is called
Then an error response is returned with status 403
Scenario: On 403 the message is retried once with new credentials
Given valid config
When the adapter instance is created
When the auth method is called
When a mock send API response is configured to return an error
When the publish method is called
Then an error response is returned with status 403
Then the credentials are deleted
Then the publish method is called with is_retry on
Then the getAuthorizationHeader method is called
Scenario: On a retried 403 the message is not retried again
Given valid config
When the adapter instance is created
When the auth method is called
When a mock send API response is configured to return an error
When the publish method is called with is_retry on
Then an error response is returned with status 403
Then the credentials are deleted
Then the publish method is not called again
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment