Sha256: 06deab8bd8e28ae993c6a21c411f61681132d739b5885cf4f81a1ce5d123ef90

Contents?: true

Size: 837 Bytes

Versions: 7

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

7 entries across 7 versions & 1 rubygems

Version Path
brightbox-cli-1.2.2 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-1.2.1 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-1.2.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-1.1.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-1.0.0 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-1.0.0.rc2 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb
brightbox-cli-1.0.0.rc1 spec/unit/brightbox/bb_config/has_multiple_clients_spec.rb