Sha256: a7f1e0a16805eeecdbc762443a8f73421bbd9c447ed79bf126d3e9cf1aa11740

Contents?: true

Size: 468 Bytes

Versions: 3

Compression:

Stored size: 468 Bytes

Contents

require_relative '../spec_helper'

describe RestfulResource::HttpClient do
  describe 'Authentication' do
    before :each do
      auth = RestfulResource::Authorization.http_authorization('user', 'passwd')
      @http_client = RestfulResource::HttpClient.new(authorization: auth)
    end

    it 'should get authenticated get' do
      response = @http_client.get('http://httpbin.org/basic-auth/user/passwd')
      expect(response.status).to eq 200
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
restful_resource-0.8.3 spec/restful_resource/http_client_spec.rb
restful_resource-0.8.2 spec/restful_resource/http_client_spec.rb
restful_resource-0.8.1 spec/restful_resource/http_client_spec.rb