Skip to content

Commit

Permalink
Include another spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnyom committed Sep 30, 2019
1 parent 276b069 commit 1e0b09b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/faraday/error_spec.rb
Expand Up @@ -24,6 +24,15 @@
it { expect(subject.inspect).to eq('#<Faraday::ClientError response={:status=>400}>') }
end

context 'with response hash but nil status' do
let(:exception) { { status: nil } }

it { expect(subject.wrapped_exception).to be_nil }
it { expect(subject.response).to eq(exception) }
it { expect(subject.message).to eq('the server responded with a nil status') }
it { expect(subject.inspect).to eq('#<Faraday::ClientError response={:status=>nil}>') }
end

context 'with string' do
let(:exception) { 'custom message' }

Expand Down

0 comments on commit 1e0b09b

Please sign in to comment.