Skip to content

Commit

Permalink
Added assertion that response is present in MaxHttpRetriesExceededError
Browse files Browse the repository at this point in the history
  • Loading branch information
kaarelss committed Nov 3, 2022
1 parent 285adc7 commit 3312bc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/clients/http_client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ def test_retries_exceeded
.with(body: @request.body.to_json, query: @request.query, headers: @expected_headers)
.to_return(body: { errors: "Something very not good" }.to_json, headers: @response_headers, status: 500)

assert_raises(ShopifyAPI::Errors::MaxHttpRetriesExceededError) { @client.request(@request) }
error = assert_raises(ShopifyAPI::Errors::MaxHttpRetriesExceededError) { @client.request(@request) }
assert_instance_of(ShopifyAPI::Clients::HttpResponse, error.response)
end

def test_throttle_error_no_retry_after_header
Expand Down

0 comments on commit 3312bc0

Please sign in to comment.