Sha256: 1f35a78281215415dc54db4063a64e8a44bd3af7dd8c2a40da72b07846865955

Contents?: true

Size: 592 Bytes

Versions: 11

Compression:

Stored size: 592 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Github::API, 'endpoint' do
  let(:endpoint) { "https://my-company/api/v3/" }
  let(:options) { {:endpoint => endpoint } }
  let(:path)  { "/repos/GitHub/issues-dev/issues" }

  subject(:api) { described_class.new(options) }

  before {
    stub_get(path, 'https://my-company/api/v3').
      to_return(:body => "[]", :status => 200, :headers =>{})
  }

  its(:endpoint) { should == endpoint }

  it "doesn't truncate endpoint" do
    expect {
      api.get_request(path)
    }.not_to raise_error(WebMock::NetConnectNotAllowedError)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
github_api-0.10.2 spec/github/request/endpoint_spec.rb
github_api-0.10.1 spec/github/request/endpoint_spec.rb
github_api-0.10.0 spec/github/request/endpoint_spec.rb
github_api-0.9.7 spec/github/request/endpoint_spec.rb
github_api-0.9.6 spec/github/request/endpoint_spec.rb
github_api-0.9.5 spec/github/request/endpoint_spec.rb
github_api-0.9.4 spec/github/request/endpoint_spec.rb
github_api-0.9.3 spec/github/request/endpoint_spec.rb
github_api-0.9.2 spec/github/request/endpoint_spec.rb
github_api-0.9.1 spec/github/request/endpoint_spec.rb
github_api-0.9.0 spec/github/request/endpoint_spec.rb