Sha256: adbcff5eb1bd74c744cb6448fa6c7fe56e7aba18edf10c55e7db4d72ba2111ed

Contents?: true

Size: 375 Bytes

Versions: 10

Compression:

Stored size: 375 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

10 entries across 10 versions & 1 rubygems

Version Path
lhc-3.4.0 spec/error/response_spec.rb
lhc-3.3.0 spec/error/response_spec.rb
lhc-3.2.0 spec/error/response_spec.rb
lhc-3.1.1 spec/error/response_spec.rb
lhc-3.1.0 spec/error/response_spec.rb
lhc-3.0.0 spec/error/response_spec.rb
lhc-2.0.0 spec/error/response_spec.rb
lhc-1.2.0 spec/error/response_spec.rb
lhc-1.1.0 spec/error/response_spec.rb
lhc-0.2.1 spec/error/response_spec.rb