test/hyperclient/entry_point_test.rb in hyperclient-0.8.2 vs test/hyperclient/entry_point_test.rb in hyperclient-0.8.3

- old
+ new

@@ -31,15 +31,18 @@ handlers.must_include FaradayMiddleware::Instrumentation end it 'creates a Faraday connection with the default block' do handlers = entry_point.connection.builder.handlers + handlers.must_include Faraday::Response::RaiseError handlers.must_include FaradayMiddleware::FollowRedirects handlers.must_include FaradayMiddleware::EncodeHalJson handlers.must_include FaradayMiddleware::ParseHalJson handlers.must_include Faraday::Adapter::NetHttp + + entry_point.connection.options.params_encoder.must_equal Faraday::FlatParamsEncoder end it 'raises a ConnectionAlreadyInitializedError if attempting to modify headers' do entry_point.connection.must_be_kind_of Faraday::Connection lambda { entry_point.headers = {} }.must_raise ConnectionAlreadyInitializedError @@ -170,15 +173,18 @@ entry_point.connection.url_prefix.to_s.must_equal 'http://my.api.org/' end it 'creates a Faraday connection with the default block plus any additional handlers' do handlers = entry_point.connection.builder.handlers + handlers.must_include Faraday::Request::OAuth handlers.must_include Faraday::Response::RaiseError handlers.must_include FaradayMiddleware::FollowRedirects handlers.must_include FaradayMiddleware::EncodeHalJson handlers.must_include FaradayMiddleware::ParseHalJson handlers.must_include Faraday::Adapter::NetHttp + + entry_point.connection.options.params_encoder.must_equal Faraday::FlatParamsEncoder end end end end end