Sha256: 14c674cff9977b7e9373e8f261a5ed7e6cecba81cc9a7e50966c89842953c154
Contents?: true
Size: 957 Bytes
Versions: 4
Compression:
Stored size: 957 Bytes
Contents
# # base_service_spec.rb # ConstantContact # # Copyright (c) 2013 Constant Contact. All rights reserved. require 'spec_helper' describe ConstantContact::Services::BaseService do describe "#get_headers" do it "gets a hash of headers" do token = 'foo' headers = ConstantContact::Services::BaseService.send(:get_headers, token) expect(headers).to be_a Hash expect(headers[:content_type]).to be_a String expect(headers[:content_type]).to eq('application/json') expect(headers[:accept]).to be_a String expect(headers[:accept]).to eq('application/json') expect(headers[:authorization]).to be_a String expect(headers[:authorization]).to eq("Bearer #{token}") expect(headers[:user_agent]).to be_a String expect(headers[:user_agent].include?("Ruby SDK v#{ConstantContact::SDK::VERSION}")).to be_true expect(headers[:user_agent].include?(RUBY_DESCRIPTION)).to be_true end end end
Version data entries
4 entries across 4 versions & 1 rubygems