Fallback to site_hostname when site_title is empty (#4394)

th-downstream
Yamagishi Kazutoshi 7 years ago committed by Eugen Rochko
parent 569a7291b6
commit ba1f0b8426

@ -2,7 +2,7 @@
module InstanceHelper
def site_title
Setting.site_title.to_s
Setting.site_title.presence || site_hostname
end
def site_hostname

@ -19,7 +19,7 @@ describe InstanceHelper do
it 'returns empty string when Setting.site_title is nil' do
Setting.site_title = nil
expect(helper.site_title).to eq ''
expect(helper.site_title).to eq 'cb6e6126.ngrok.io'
end
end

Loading…
Cancel
Save