Merge branch 'release/12.3' into dev

pull/11457/head
ulferts 2 years ago
commit 430099c275
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 5
      config/constants/settings/definition.rb
  2. 6
      spec/constants/settings/definition_spec.rb

@ -230,9 +230,10 @@ module Settings
envs = ['default', Rails.env]
envs.delete('default') if Rails.env.test? # The test setup should govern the configuration
envs.each do |env|
next unless file_config.dig(env, definition.name)
next unless (env_config = file_config[env])
next unless env_config.has_key?(definition.name)
definition.override_value(file_config.dig(env, definition.name))
definition.override_value(env_config[definition.name])
end
end

@ -383,6 +383,7 @@ describe Settings::Definition do
default:
edition: 'bim'
sendmail_location: 'default_location'
direct_uploads: false
test:
smtp_address: 'test address'
sendmail_location: 'test location'
@ -448,6 +449,11 @@ describe Settings::Definition do
.to eql DateTime.parse("2222-01-01")
end
it 'correctly overrides a default by a false value' do
expect(all.detect { |d| d.name == 'direct_uploads' }.value)
.to be false
end
context 'when Rails environment is test' do
before do
allow(Rails.env)

Loading…
Cancel
Save