mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: blank global settings should not shadow
Due to https://github.com/docker/docker/issues/9298 it is a huge pain to remove ENV vars when composing images, allow us to simply treat "blank" as a ENV var that is not being shadowed. In general we always supply a value to ENV vars we are shadowing.
This commit is contained in:
@ -447,6 +447,18 @@ describe SiteSettingExtension do
|
||||
end
|
||||
end
|
||||
|
||||
context "with blank global setting" do
|
||||
before do
|
||||
GlobalSetting.stubs(:nada).returns('')
|
||||
settings.setting(:nada, 'nothing', shadowed_by_global: true)
|
||||
settings.refresh!
|
||||
end
|
||||
|
||||
it "should return default cause nothing is set" do
|
||||
expect(settings.nada).to eq('nothing')
|
||||
end
|
||||
end
|
||||
|
||||
context "with global setting" do
|
||||
before do
|
||||
GlobalSetting.stubs(:trout_api_key).returns('purringcat')
|
||||
|
Reference in New Issue
Block a user