Sha256: c9bf33d57dc3f4a947382934ababfa892dd1a3eaef9abbd9cd5bc3babac3b3b8

Contents?: true

Size: 682 Bytes

Versions: 1

Compression:

Stored size: 682 Bytes

Contents

require 'helper'

describe Octokit::Client do

  it "should connect using the endpoint configuration" do
    client = Octokit::Client.new
    endpoint = URI.parse(client.endpoint)
    connection = client.send(:connection).build_url(nil).to_s
    connection.should == endpoint.to_s
  end

  it 'should work with basic auth' do
    stub_request(:get, "https://foo%2Ftoken:bar@github.com/api/v2/json/commits/list/baz/quux/master").
      with(:headers => {'Accept'=>'*/*'}).
      to_return(:status => 200, :body => '{"commits":[]}', :headers => {})
    proc {
      Octokit::Client.new(:login => 'foo', :token => 'bar').commits('baz/quux')
    }.should_not raise_exception
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
octokit-0.6.2 spec/octokit/client_spec.rb