4ec16912b8
- rewords examples starting with 'should' - rewords examples starting with 'it' Note: I had to manually fixup "onlies" to "only"
29 lines
892 B
Ruby
29 lines
892 B
Ruby
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
|