Sha256: 00d0a4363a663ff31f8d5ee50cb42c8eda2b131f19427e300007b9091c57b201

Contents?: true

Size: 756 Bytes

Versions: 2

Compression:

Stored size: 756 Bytes

Contents

require 'spec_helper'

class WithSslOptions
  include SoapObject

  ssl_options do |opts|
    opts.verify_mode = :peer
    opts.version = :SSLv2
  end

end

describe SoapObject do
  let(:client) { double('client') }
  let(:platform) {double('savon')}

  before do
    allow(platform).to receive(:client).and_return(client)
  end

  context 'when setting client ssl options' do

    it 'should allow one to enable SSL verification' do
      expect(platform).to receive(:client).with(hash_including(ssl_verify_mode: :peer))

      WithSslOptions.new(platform)
    end

    it 'should allow one to set SSL version' do
      expect(platform).to receive(:client).with(hash_including(ssl_version: :SSLv2))

      WithSslOptions.new(platform)
    end
  end


end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
soap-object-0.6.7 spec/lib/ssl_options_spec.rb
soap-object-0.6.6 spec/lib/ssl_options_spec.rb