Sha256: cff1c339f77a3dc3db89bb8fbdeec2184f65e0c604abd1b8394800bb836120e0

Contents?: true

Size: 619 Bytes

Versions: 5

Compression:

Stored size: 619 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
        Elastic::EnterpriseSearch.endpoint = 'https://api.swiftype.com/api/v1'
        expect(Elastic::EnterpriseSearch.endpoint).to eq('https://api.swiftype.com/api/v1/')
      end
    end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
elastic-enterprise-search-0.3.1 spec/configuration_spec.rb
elastic-enterprise-search-0.3.0 spec/configuration_spec.rb
elastic-enterprise-search-0.2.1 spec/configuration_spec.rb
elastic-enterprise-search-0.2.0 spec/configuration_spec.rb
elastic-enterprise-search-0.1.0 spec/configuration_spec.rb