Skip to content

Commit

Permalink
Ensure that middleware is in the correct order
Browse files Browse the repository at this point in the history
  • Loading branch information
rzane committed Jan 23, 2025
1 parent d558289 commit 454346c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/test_track/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
stub_request(:post, 'http://testtrack.dev/foo').to_raise(Faraday::ConnectionFailed)
expect { described_class.connection.post('/foo') }.to raise_error(TestTrack::UnrecoverableConnectivityError)
end

it 'raises status errors before attempting to parse' do
stub_request(:post, 'http://testtrack.dev/foo').to_return(status: 500, body: '<html></html>')
expect { described_class.connection.post('/foo') }.to raise_error(TestTrack::UnrecoverableConnectivityError)
end
end

describe '.connection=' do
Expand Down

0 comments on commit 454346c

Please sign in to comment.