Skip to content

Commit

Permalink
Increase code coverage (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala authored Jan 20, 2025
1 parent bf87e81 commit be8e2f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/lib/colore/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
allow(client.send(:connection)).to receive(:head) { raise Faraday::ConnectionFailed }
expect { client.ping }.to raise_error(Colore::Errors::ColoreUnavailable)
end

it 'raises a generic error when response is unknown' do
allow(client.send(:connection)).to receive(:head).and_return(Faraday::Response.new)
expect { client.ping }.to raise_error(Colore::Errors::ServerError, 'Unknown error (see response_body)')
end
end

describe '#create_document', :vcr do
Expand Down

0 comments on commit be8e2f9

Please sign in to comment.