Sha256: b5010c99a2269125226b10036685e76599d0fc0e5ef10f17b8e7bb402b8f9aee

Contents?: true

Size: 837 Bytes

Versions: 58

Compression:

Stored size: 837 Bytes

Contents

require "spec_helper"

describe Brightbox::BBConfig do
  let(:config) { config_from_contents(contents) }

  describe "#has_multiple_clients?" do
    context "when config has multiple clients" do
      let(:contents) do
        <<-EOS
        [core]
        default_account = cli-12345

        [cli-12345]
        client_id = cli-12345

        [app-12345]
        client_id = app-12345
        EOS
      end
      it "is true" do
        expect(config.has_multiple_clients?).to be true
      end
    end

    context "when config does not have multiple clients" do
      let(:contents) do
        <<-EOS
        [core]
        default_account = cli-12345

        [cli-12345]
        client_id = cli-12345
        EOS
      end
      it "is false" do
        expect(config.has_multiple_clients?).to be false
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
brightbox-cli-5.0.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-5.0.0.rc2 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-5.0.0.rc1 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-5.0.0.alpha spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.8.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.7.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.6.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.5.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.5.0.rc1 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.4.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.3.2 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.3.1 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.3.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.2.1 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.2.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.1.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.0.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-4.0.0.rc2 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-3.3.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-3.2.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb