Skip to content

Commit

Permalink
[TESTING] Remove redundant testing, define adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed Sep 11, 2024
1 parent 549b827 commit 9e0b703
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 32 deletions.
16 changes: 0 additions & 16 deletions spec/enterprise-search/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,28 +109,12 @@ def messages; @strio.string; end
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
end
1 change: 1 addition & 0 deletions spec/integration/app-search/app_search_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# frozen_string_literal: true

require 'spec_helper'
require 'faraday/patron'
require 'logger'

# App Search Integration tests Client Configuration
Expand Down
1 change: 1 addition & 0 deletions spec/integration/enterprise_search_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# frozen_string_literal: true

require 'spec_helper'
require 'faraday/patron'

describe Elastic::EnterpriseSearch::Client do
let(:host) { ENV['ELASTIC_ENTERPRISE_HOST'] || 'http://localhost:3002' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# frozen_string_literal: true

require 'spec_helper'
require 'faraday/patron'

# Workplace Search Integration tests Client Configuration
def client
Expand Down
16 changes: 0 additions & 16 deletions spec/workplace-search/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,28 +101,12 @@
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
end

0 comments on commit 9e0b703

Please sign in to comment.