Sha256: 82e80fe013241d1aefe4a8b0f9cbc8af3dbbaeba1805a18e62001d31b1bd4e8c

Contents?: true

Size: 931 Bytes

Versions: 18

Compression:

Stored size: 931 Bytes

Contents

# frozen_string_literal: true

RSpec.shared_examples 'client' do
  subject(:client) { described_class.client }

  it { is_expected.to be_kind_of(Net::HTTP) }

  it 'assigns use_ssl' do
    expect(client.use_ssl?).to be true
  end

  it 'returns new instance' do
    expect(described_class.client.object_id).to_not eq described_class.client.object_id
  end

  if RUBY_VERSION >= '2.6.0'
    it 'sets the timeouts, including the write timeout' do
      expect(described_class.client.open_timeout).to_not be_nil
      expect(described_class.client.read_timeout).to_not be_nil
      expect(described_class.client.write_timeout).to_not be_nil
    end
  else
    it 'sets the open and read timeouts, but not the write timeout' do
      expect(described_class.client.open_timeout).to_not be_nil
      expect(described_class.client.read_timeout).to_not be_nil
      expect(described_class.client.write_timeout).to be_nil
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
workos-5.9.0 spec/support/shared_examples/client.rb
workos-5.8.0 spec/support/shared_examples/client.rb
workos-5.7.0 spec/support/shared_examples/client.rb
workos-5.6.0 spec/support/shared_examples/client.rb
workos-5.5.1 spec/support/shared_examples/client.rb
workos-5.5.0 spec/support/shared_examples/client.rb
workos-5.4.0 spec/support/shared_examples/client.rb
workos-5.3.0 spec/support/shared_examples/client.rb
workos-5.2.1 spec/support/shared_examples/client.rb
workos-5.2.0 spec/support/shared_examples/client.rb
workos-5.1.0 spec/support/shared_examples/client.rb
workos-5.0.0 spec/support/shared_examples/client.rb
workos-4.8.0 spec/support/shared_examples/client.rb
workos-4.5.0 spec/support/shared_examples/client.rb
workos-4.4.0 spec/support/shared_examples/client.rb
workos-4.3.0 spec/support/shared_examples/client_spec.rb
workos-4.2.1 spec/support/shared_examples/client_spec.rb
workos-4.2.0 spec/support/shared_examples/client_spec.rb