Sha256: ce1fd35497924998ef91a21d59c94beee3b78e0ed206d2f332035afd9daf8d78

Contents?: true

Size: 373 Bytes

Versions: 75

Compression:

Stored size: 373 Bytes

Contents

require 'rails_helper'

describe LHC::Error do
  context 'response' do
    it 'throws timeout exception in case of a timeout' do
      stub_request(:any, 'local.ch').to_return(status: 403)
      begin
        LHC.get('local.ch')
      rescue => e
        expect(e.response).to be_kind_of(LHC::Response)
        expect(e.response.code).to eq 403
      end
    end
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
lhc-10.1.2 spec/error/response_spec.rb
lhc-10.1.1 spec/error/response_spec.rb
lhc-10.1.0 spec/error/response_spec.rb
lhc-10.0.2 spec/error/response_spec.rb
lhc-9.4.4 spec/error/response_spec.rb
lhc-10.0.1 spec/error/response_spec.rb
lhc-10.0.0 spec/error/response_spec.rb
lhc-9.4.3 spec/error/response_spec.rb
lhc-9.4.2 spec/error/response_spec.rb
lhc-9.4.1 spec/error/response_spec.rb
lhc-9.4.0 spec/error/response_spec.rb
lhc-9.3.1 spec/error/response_spec.rb
lhc-9.3.0 spec/error/response_spec.rb
lhc-9.2.0 spec/error/response_spec.rb
lhc-9.1.2 spec/error/response_spec.rb
lhc-9.1.2.pre spec/error/response_spec.rb
lhc-9.1.1 spec/error/response_spec.rb
lhc-8.1.1 spec/error/response_spec.rb
lhc-9.1.0 spec/error/response_spec.rb
lhc-9.0.0 spec/error/response_spec.rb