test/integration/transport_test.rb in elasticsearch-transport-0.4.11 vs test/integration/transport_test.rb in elasticsearch-transport-1.0.0.rc1
- old
+ new
@@ -30,24 +30,10 @@
client = Elasticsearch::Transport::Client.new transport: transport
client.perform_request 'GET', ''
end
- should "allow to define connection parameters and pass them" do
- transport = Elasticsearch::Transport::Transport::HTTP::Faraday.new \
- :hosts => [ { :host => 'localhost', :port => @port } ],
- :options => { :transport_options => {
- :params => { :format => 'yaml' }
- }
- }
-
- client = Elasticsearch::Transport::Client.new transport: transport
- response = client.perform_request 'GET', ''
-
- assert response.body.start_with?("---\n"), "Response body should be YAML: #{response.body.inspect}"
- end
-
should "use the Curb client" do
require 'curb'
require 'elasticsearch/transport/transport/http/curb'
transport = Elasticsearch::Transport::Transport::HTTP::Curb.new \
@@ -55,26 +41,9 @@
curl.verbose = true
end
client = Elasticsearch::Transport::Client.new transport: transport
client.perform_request 'GET', ''
- end unless JRUBY
-
- should "deserialize JSON responses in the Curb client" do
- require 'curb'
- require 'elasticsearch/transport/transport/http/curb'
-
- transport = Elasticsearch::Transport::Transport::HTTP::Curb.new \
- :hosts => [ { :host => 'localhost', :port => @port } ] do |curl|
- curl.verbose = true
- end
-
- client = Elasticsearch::Transport::Client.new transport: transport
- response = client.perform_request 'GET', ''
-
- assert_respond_to(response.body, :to_hash)
- assert_equal 200, response.body['status']
- assert_equal 'application/json', response.headers['content-type']
end unless JRUBY
end
end