Sha256: 74e3c258cf104bdeef786b131ae4c585c6cefb9dd016a9ff24fe9e49e630ff45

Contents?: true

Size: 635 Bytes

Versions: 10

Compression:

Stored size: 635 Bytes

Contents

describe ChatWork::OAuthClient do
  describe "#initialize" do
    subject do
      ChatWork::OAuthClient.new(
        client_id:     client_id,
        client_secret: client_secret,
        api_base:      api_base,
      )
    end

    let(:client_id)     { "client_id" }
    let(:client_secret) { "client_secret" }
    let(:api_base)      { "https://token.chatwork.com/" }
    let(:signature)     { "Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=" }

    it "client has Authorization header" do
      connection = subject.instance_variable_get(:@conn)

      expect(connection.headers["Authorization"]).to eq "Basic #{signature}"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
chatwork-1.0.1 spec/lib/chatwork/oauth_client_spec.rb
chatwork-1.0.0 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.12.3 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.12.2 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.12.1 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.12.0 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.11.0 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.10.0 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.9.0 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.8.0 spec/lib/chatwork/oauth_client_spec.rb