Sha256: 3c1369bc43a083db636b166148f9bd4d48e2b744e77ab5d8acef221be716ac5f

Contents?: true

Size: 404 Bytes

Versions: 49

Compression:

Stored size: 404 Bytes

Contents

# frozen_string_literal: true

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

49 entries across 49 versions & 1 rubygems

Version Path
lhc-15.2.1 spec/error/response_spec.rb
lhc-15.2.0 spec/error/response_spec.rb
lhc-15.1.3 spec/error/response_spec.rb
lhc-15.1.2 spec/error/response_spec.rb
lhc-15.1.1 spec/error/response_spec.rb
lhc-15.1.0 spec/error/response_spec.rb
lhc-16.0.0.pre.pro2162.2 spec/error/response_spec.rb
lhc-16.0.0.pre.pro2162 spec/error/response_spec.rb
lhc-15.0.1 spec/error/response_spec.rb
lhc-15.0.0 spec/error/response_spec.rb
lhc-14.0.0 spec/error/response_spec.rb
lhc-13.4.0.pre.pro1766.1 spec/error/response_spec.rb
lhc-13.2.0 spec/error/response_spec.rb
lhc-13.1.0 spec/error/response_spec.rb
lhc-13.0.0 spec/error/response_spec.rb
lhc-12.3.0 spec/error/response_spec.rb
lhc-12.2.1 spec/error/response_spec.rb
lhc-12.2.0 spec/error/response_spec.rb
lhc-12.1.3 spec/error/response_spec.rb
lhc-12.1.2 spec/error/response_spec.rb