spec/app-search/client_spec.rb in elastic-enterprise-search-8.4.0 vs spec/app-search/client_spec.rb in elastic-enterprise-search-8.5.0

- old
+ new

@@ -84,34 +84,7 @@ expect(decoded_token[0]['api_key_name']).to(eq(api_key_name)) expect(decoded_token[0]['query']).to(eq('cat')) end end - context 'adapters' do - let(:client) { described_class.new } - let(:adapter) { client.transport.transport.connections.all.first.connection.builder.adapter } - - context 'when no adapter is specified' do - it 'uses Faraday NetHttp' do - expect(adapter).to eq Faraday::Adapter::NetHttp - end - end - - context 'when the adapter is patron' do - let(:client) { described_class.new(adapter: :patron) } - - it 'uses Faraday with the adapter' do - expect(adapter).to eq Faraday::Adapter::Patron - end - end - - unless defined?(JRUBY_VERSION) - context 'when the adapter is typhoeus' do - let(:client) { described_class.new(adapter: :patron) } - - it 'uses Faraday with the adapter' do - expect(adapter).to eq Faraday::Adapter::Patron - end - end - end - end + include_examples 'adapters compatibility' end