Sha256: d679ccb3be54b6b0e7e5c49a65a762f1d52cb224f5ddc6ab7dc99e87389f1de7

Contents?: true

Size: 591 Bytes

Versions: 7

Compression:

Stored size: 591 Bytes

Contents

require 'spec_helper'

describe 'Configuration' do
  context '.endpoint' do
    context 'with a trailing /' do
      it 'adds / to the end of of the URL' do
        SwiftypeEnterprise.endpoint = 'https://api.swiftype.com/api/v1'
        expect(SwiftypeEnterprise.endpoint).to eq('https://api.swiftype.com/api/v1/')
      end
    end

    context 'with a trailing /' do
      it 'leaves the URL alone' do
        SwiftypeEnterprise.endpoint = 'https://api.swiftype.com/api/v1/'
        expect(SwiftypeEnterprise.endpoint).to eq('https://api.swiftype.com/api/v1/')
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
swiftype-enterprise-3.0.3 spec/configuration_spec.rb
swiftype-enterprise-3.0.2 spec/configuration_spec.rb
swiftype-enterprise-3.0.1 spec/configuration_spec.rb
swiftype-enterprise-3.0.0 spec/configuration_spec.rb
swiftype-enterprise-2.0.0 spec/configuration_spec.rb
swiftype-enterprise-1.0.1 spec/configuration_spec.rb
swiftype-enterprise-1.0.0 spec/configuration_spec.rb