Sha256: 0d5af8644cb68aa1ea4b9e943382c4123a083b3bb1be4a5ebcc4ff5cbf563b3a

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 KB

Contents

require 'spec_helper'

module Fifthgear
  describe Configuration do
    let(:api_root) {'https://commerceservicestest.infifthgear.com'}
    let(:username) {'rick'}
    let(:password) {'rubin'}
    let(:company_id) {'company123'}
    let(:content_type) {'application/json'}
    let(:raise_errors) { true }
    let(:timeout) { 5 }

    it 'has default values' do
      expect(Configuration.new.api_root).to eq(api_root)
      expect(Configuration.new.content_type).to eq(content_type)
      expect(Configuration.new.raise_errors).to eq(false)
    end

    it 'can set values' do
      config = Configuration.new
      config.api_root = api_root
      config.username = username
      config.password = password
      config.company_id = company_id
      config.raise_errors = raise_errors
      config.timeout = timeout
      config.open_timeout = timeout

      expect(config.api_root).to eq(api_root)
      expect(config.username).to eq(username)
      expect(config.password).to eq(password)
      expect(config.company_id).to eq(company_id)
      expect(config.raise_errors).to eq(raise_errors)
      expect(config.timeout).to eq(timeout)
      expect(config.open_timeout).to eq(timeout)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fifthgear-0.0.8 spec/fifthgear/configuration_spec.rb