Sha256: 01221d50bf859386e9aa5ec74e16b51cda10296ab18181ed263cd58435ca259f

Contents?: true

Size: 591 Bytes

Versions: 6

Compression:

Stored size: 591 Bytes

Contents

require 'spec_helper'

describe GH::CustomLimit do
  before do
    subject.client_id     = 'foo'
    subject.client_secret = 'bar'
  end

  it 'adds client_id and client_secret to a request' do
    headers = {
      "User-Agent"     => "GH/#{GH::VERSION}",
      "Accept"         => "application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1",
      "Accept-Charset" => "utf-8"
    }

    subject.
      should_receive(:http).
      with(:get, '/x?client_id=foo&client_secret=bar', headers).
      and_return(GH::Response.new)

    subject['/x']
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gh-0.13.0 spec/custom_limit_spec.rb
gh-0.12.4 spec/custom_limit_spec.rb
gh-0.12.3 spec/custom_limit_spec.rb
gh-0.12.2 spec/custom_limit_spec.rb
gh-0.12.1 spec/custom_limit_spec.rb
gh-0.12.0 spec/custom_limit_spec.rb