Sha256: 9f491a474def3b362e84df509f8b6558ebc2b1fc01db60704cf2575b65b86d03

Contents?: true

Size: 1.78 KB

Versions: 10

Compression:

Stored size: 1.78 KB

Contents

# Copyright (C) 2014 Conjur Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

require 'spec_helper'
require 'tempfile'

# RestClient monkey patches MIME::Types, breaking it in certain situations.
# Let's make sure we monkey patch the monkey patch if necessary.

describe RestClient::Request do
  shared_examples :restclient do
    it "can be initialized" do
      expect { RestClient::Request.new method: 'GET', url: 'http://example.com' }.to_not raise_error
    end
  end

  context 'default arguments' do
    let(:cache) { nil }
    let(:lazy) { false }
    it "sets cert_store to OpenSSL's default cert store" do
      request = RestClient::Request.new(method: 'GET', url: 'http://example.com')
      expect(request.ssl_opts[:cert_store]).to eq(OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
conjur-api-5.3.4 spec/vendor/rest_client_spec.rb
conjur-api-5.3.3 spec/vendor/rest_client_spec.rb
conjur-api-5.3.2 spec/vendor/rest_client_spec.rb
conjur-api-5.3.1 spec/vendor/rest_client_spec.rb
conjur-api-5.3.0 spec/vendor/rest_client_spec.rb
conjur-api-5.2.1 spec/vendor/rest_client_spec.rb
conjur-api-5.2.0 spec/vendor/rest_client_spec.rb
conjur-api-5.1.0 spec/vendor/rest_client_spec.rb
conjur-api-5.0.0 spec/vendor/rest_client_spec.rb
conjur-api-5.0.0.rc1 spec/vendor/rest_client_spec.rb