Sha256: 8fee9d179a4f2294a26235045b153bf5a0c69007df367b82f285d0ac94e5dd4b

Contents?: true

Size: 701 Bytes

Versions: 14

Compression:

Stored size: 701 Bytes

Contents

require "spec_helper"

describe Brightbox::BBConfig do
  describe "#client_id" do
    context "when client has old 'alias' key" do
      let(:contents) do
        <<-EOS
        [core]
        default_client = section

        [section]
        alias = alias
        client_id = cli-12345
        EOS
      end
      let(:config) { config_from_contents(contents) }

      it "returns the identifier" do
        expect(config.client_id).to eql("cli-12345")
      end

      it "doesn't return the section header" do
        expect(config.client_id).to_not eql("section")
      end

      it "doesn't return the alias" do
        expect(config.client_id).to_not eql("alias")
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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