gitlab-org--gitlab-foss/spec/config/object_store_settings_spec.rb
gfyoung 93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00

31 lines
923 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('config', 'object_store_settings.rb')
describe ObjectStoreSettings do
describe '.parse' do
it 'sets correct default values' do
settings = described_class.parse(nil)
expect(settings['enabled']).to be false
expect(settings['direct_upload']).to be false
expect(settings['background_upload']).to be true
expect(settings['remote_directory']).to be nil
end
it 'respects original values' do
original_settings = Settingslogic.new({
'enabled' => true,
'remote_directory' => 'artifacts'
})
settings = described_class.parse(original_settings)
expect(settings['enabled']).to be true
expect(settings['direct_upload']).to be false
expect(settings['background_upload']).to be true
expect(settings['remote_directory']).to eq 'artifacts'
end
end
end