|
1241 | 1241 |
|
1242 | 1242 | context 'when \'transport_options\' are defined with \'accept_encoding\' specified' do |
1243 | 1243 |
|
1244 | | - context 'when using the Net::HTTP adapter' do |
| 1244 | + context 'when using Faraday as the transport' do |
1245 | 1245 |
|
1246 | | - let!(:client) do |
1247 | | - #described_class.new(transport_options: { headers: { accept_encoding: 'gzip' } }, adapter: :net_http) |
1248 | | - described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :net_http) |
1249 | | - end |
| 1246 | + context 'when using the Net::HTTP adapter' do |
| 1247 | + |
| 1248 | + let(:client) do |
| 1249 | + described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :net_http) |
| 1250 | + end |
1250 | 1251 |
|
1251 | | - it 'sets the options on the transport' do |
1252 | | - expect(client.perform_request('GET', '/').body).to be_a(Hash) |
| 1252 | + it 'sets the options on the transport' do |
| 1253 | + expect(client.perform_request('GET', '/').body).to be_a(Hash) |
| 1254 | + end |
1253 | 1255 | end |
1254 | | - end |
1255 | 1256 |
|
1256 | | - context 'when using the HTTPClient adapter' do |
| 1257 | + context 'when using the HTTPClient adapter' do |
1257 | 1258 |
|
1258 | | - let!(:client) do |
1259 | | - described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :httpclient) |
1260 | | - end |
| 1259 | + let(:client) do |
| 1260 | + described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :httpclient) |
| 1261 | + end |
1261 | 1262 |
|
1262 | | - it 'sets the options on the transport' do |
1263 | | - expect(client.perform_request('GET', '/').body).to be_a(Hash) |
| 1263 | + it 'sets the options on the transport' do |
| 1264 | + expect(client.perform_request('GET', '/').body).to be_a(Hash) |
| 1265 | + end |
1264 | 1266 | end |
1265 | | - end |
1266 | 1267 |
|
1267 | | - context 'when using the Patron adapter' do |
| 1268 | + context 'when using the Patron adapter' do |
1268 | 1269 |
|
1269 | | - let!(:client) do |
1270 | | - described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :patron) |
1271 | | - end |
| 1270 | + let(:client) do |
| 1271 | + described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :patron) |
| 1272 | + end |
1272 | 1273 |
|
1273 | | - it 'sets the options on the transport' do |
1274 | | - expect(client.perform_request('GET', '/').body).to be_a(Hash) |
| 1274 | + it 'sets the options on the transport' do |
| 1275 | + expect(client.perform_request('GET', '/').body).to be_a(Hash) |
| 1276 | + end |
1275 | 1277 | end |
1276 | | - end |
1277 | 1278 |
|
1278 | | - context 'when using the Net::HTTP::Persistent adapter' do |
| 1279 | + context 'when using the Net::HTTP::Persistent adapter' do |
1279 | 1280 |
|
1280 | | - let!(:client) do |
1281 | | - described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :net_http_persistent) |
1282 | | - end |
| 1281 | + let(:client) do |
| 1282 | + described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :net_http_persistent) |
| 1283 | + end |
1283 | 1284 |
|
1284 | | - it 'sets the options on the transport' do |
1285 | | - expect(client.perform_request('GET', '/').body).to be_a(Hash) |
| 1285 | + it 'sets the options on the transport' do |
| 1286 | + expect(client.perform_request('GET', '/').body).to be_a(Hash) |
| 1287 | + end |
1286 | 1288 | end |
1287 | | - end |
1288 | 1289 |
|
1289 | | - context 'when using the Typhoeus adapter' do |
| 1290 | + context 'when using the Typhoeus adapter' do |
1290 | 1291 |
|
1291 | | - let!(:client) do |
1292 | | - described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :typhoeus) |
1293 | | - end |
| 1292 | + let(:client) do |
| 1293 | + described_class.new(hosts: ELASTICSEARCH_HOSTS, compression: true, adapter: :typhoeus) |
| 1294 | + end |
1294 | 1295 |
|
1295 | | - it 'sets the options on the transport' do |
1296 | | - expect(client.perform_request('GET', '/').body).to be_a(Hash) |
| 1296 | + it 'sets the options on the transport' do |
| 1297 | + expect(client.perform_request('GET', '/').body).to be_a(Hash) |
| 1298 | + end |
1297 | 1299 | end |
1298 | 1300 | end |
1299 | 1301 | end |
|
0 commit comments