Sha256: f94a63c4a1be40fc24bb4b6c3410ce99597c7908680e2ab9b0cb92163c89bc3c

Contents?: true

Size: 890 Bytes

Versions: 57

Compression:

Stored size: 890 Bytes

Contents

require "spec_helper"

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

  describe "#to_fog" do
    context "when not configured" do
      let(:contents) { "" }

      it "raises an error" do
        expect do
          fog_config
        end.to raise_error(Brightbox::BBConfigError)
      end
    end

    context "when configured with API client" do
      let(:contents) { API_CLIENT_CONFIG_CONTENTS }

      it "doesn't includes the password" do
        expect(fog_config).to_not have_key(:brightbox_password)
      end
    end

    context "when configured with a User app" do
      let(:contents) { USER_APP_CONFIG_CONTENTS }

      it "includes the password" do
        skip "context is wrong to pass require values through"
        expect(fog_config).to have_key(:brightbox_password)
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

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