Sha256: 1b805917c1fdb9fda21314ac757372ab44119ec780cb559b8117b8df1186e546

Contents?: true

Size: 544 Bytes

Versions: 4

Compression:

Stored size: 544 Bytes

Contents

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

    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

4 entries across 4 versions & 1 rubygems

Version Path
chatwork-0.7.0 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.6.2 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.6.1 spec/lib/chatwork/oauth_client_spec.rb
chatwork-0.6.0 spec/lib/chatwork/oauth_client_spec.rb