Sha256: 2c7c1ef5b9bd7ac9f373e480dc90dba11a610b42a41e7930fcd78323f471d834

Contents?: true

Size: 1.46 KB

Versions: 12

Compression:

Stored size: 1.46 KB

Contents

require 'spec_helper'

describe Qualtrics::Configuration do
  it 'has a version' do
    version = '2.3'
    configuration = Qualtrics::Configuration.new do |config|
      config.version = version
    end
    expect(configuration.version).to eq(version)
  end

  it 'defaults to latest version' do
    configuration = Qualtrics::Configuration.new
    expect(configuration.version).to eq(Qualtrics::Configuration::DEFAULT_VERSION)
  end

  it 'has a user' do
    user = 'fake@example.com'
    configuration = Qualtrics::Configuration.new do |config|
      config.user = user
    end
    expect(configuration.user).to eq(user)
  end

  it 'has a token' do
    token = '12341234'
    configuration = Qualtrics::Configuration.new do |config|
      config.token = token
    end
    expect(configuration.token).to eq(token)
  end

  it 'has an endpoint' do
    endpoint = 'https://co1.qualtrics.com/WRAPI/ControlPanel/api.php'
    configuration = Qualtrics::Configuration.new do |config|
      config.endpoint = endpoint
    end
    expect(configuration.endpoint).to eq(endpoint)
  end

  it 'has a default endpoint' do
    configuration = Qualtrics::Configuration.new
    expect(configuration.endpoint).to eq(Qualtrics::Configuration::DEFAULT_ENDPOINT)
  end

  it 'has a default library id' do
    library_id = 1
    configuration = Qualtrics::Configuration.new do |config|
      config.default_library_id = library_id
    end
    expect(configuration.default_library_id).to eql(library_id)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
qualtrics-0.6.1 spec/qualtrics/configuration_spec.rb
qualtrics-0.6.0 spec/qualtrics/configuration_spec.rb
qualtrics-0.5.9b spec/qualtrics/configuration_spec.rb
qualtrics-0.5.9 spec/qualtrics/configuration_spec.rb
qualtrics-0.5.8 spec/qualtrics/configuration_spec.rb
qualtrics-0.5.7 spec/qualtrics/configuration_spec.rb
qualtrics-0.5.6 spec/qualtrics/configuration_spec.rb
qualtrics-0.5.5 spec/qualtrics/configuration_spec.rb
qualtrics-0.5.4 spec/qualtrics/configuration_spec.rb
qualtrics-0.5.3 spec/qualtrics/configuration_spec.rb
qualtrics-0.5.2 spec/qualtrics/configuration_spec.rb
qualtrics-0.5.1 spec/qualtrics/configuration_spec.rb