Sha256: c937955fa357a35495b1b2ba615fa526a31ebca96476c0ffd4bf5afb19c35617

Contents?: true

Size: 804 Bytes

Versions: 15

Compression:

Stored size: 804 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

describe Roqua::Healthy::Client do
  context 'fully configured client' do
    subject do
      Roqua::Healthy::Client.new(
        a19_endpoint: 'http://a19_endpoint.dev',
        a19_username: 'foo',
        a19_password: 'bar'
      )
    end

    it { expect(subject.a19_endpoint).to eq 'http://a19_endpoint.dev' }
    it { expect(subject.a19_username).to eq 'foo' }
    it { expect(subject.a19_password).to eq 'bar' }
    it { expect(subject.use_basic_auth?).to be_truthy }
  end

  context 'unconfigured client' do
    subject { Roqua::Healthy::Client.new }

    it 'defaults to system wide config' do
      expect(subject.a19_endpoint).to eq Roqua::Healthy.a19_endpoint
    end

    it { expect(subject.use_basic_auth?).to be_falsey }
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
roqua-healthy-1.6.0 spec/unit/client_spec.rb
roqua-healthy-1.5.13 spec/unit/client_spec.rb
roqua-healthy-1.5.12 spec/unit/client_spec.rb
roqua-healthy-1.5.11 spec/unit/client_spec.rb
roqua-healthy-1.5.10 spec/unit/client_spec.rb
roqua-healthy-1.5.9 spec/unit/client_spec.rb
roqua-healthy-1.5.8 spec/unit/client_spec.rb
roqua-healthy-1.5.7 spec/unit/client_spec.rb
roqua-healthy-1.5.6 spec/unit/client_spec.rb
roqua-healthy-1.5.5 spec/unit/client_spec.rb
roqua-healthy-1.5.4 spec/unit/client_spec.rb
roqua-healthy-1.5.3 spec/unit/client_spec.rb
roqua-healthy-1.5.2 spec/unit/client_spec.rb
roqua-healthy-1.5.1 spec/unit/client_spec.rb
roqua-healthy-1.5.0 spec/unit/client_spec.rb