Sha256: 20b01e0296b431d202ac6aa5648c6a213a234d71c3a458f29f7241a1e7b19b23

Contents?: true

Size: 771 Bytes

Versions: 16

Compression:

Stored size: 771 Bytes

Contents

require 'core/spec_helper'

describe ZendeskAPI::Configuration do
  subject { ZendeskAPI::Configuration.new }

  it "should properly merge options" do
    url = "test.host"
    subject.url = url
    expect(subject.options[:url]).to eq(url)
  end

  it "should set accept header properly" do
    expect(subject.options[:headers][:accept]).to eq('application/json')
  end

  it "should set user agent header properly" do
    expect(subject.options[:headers][:user_agent]).to match(/ZendeskAPI API/)
  end

  it "should set a default open_timeout" do
    expect(subject.options[:request][:open_timeout]).to eq(10)
  end

  it "should merge options with client_options" do
    subject.client_options = {:ssl => false}
    expect(subject.options[:ssl]).to eq(false)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
zendesk_api-1.9.6 spec/core/configuration_spec.rb
zendesk_api-1.9.5 spec/core/configuration_spec.rb
zendesk_api-1.9.4 spec/core/configuration_spec.rb
zendesk_api-1.9.3 spec/core/configuration_spec.rb
zendesk_api-1.9.2 spec/core/configuration_spec.rb
zendesk_api-1.9.1 spec/core/configuration_spec.rb
zendesk_api-1.9.0 spec/core/configuration_spec.rb
zendesk_api-1.8.0 spec/core/configuration_spec.rb
zendesk_api-1.7.4 spec/core/configuration_spec.rb
zendesk_api-1.7.3 spec/core/configuration_spec.rb
zendesk_api-1.7.1 spec/core/configuration_spec.rb
zendesk_api-1.7.0 spec/core/configuration_spec.rb
zendesk_api-1.6.3 spec/core/configuration_spec.rb
zendesk_api-1.6.2 spec/core/configuration_spec.rb
zendesk_api-1.6.1 spec/core/configuration_spec.rb
zendesk_api-1.6.0 spec/core/configuration_spec.rb