commit: ef44c62d17085e71a807705f25c549553676c5f1
parent: 219aac7800a086a75f3ef36f71955bb8b6ccc2c0
Author: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Date: Mon, 5 Mar 2018 04:29:49 +0900
Do not default site_title with site_hostname in InstanceHelper (#6624)
site_title is "Mastodon" by default configuration, and there is no need to
default site_title with site_hostname in InstanceHelper.
Diffstat:
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/app/helpers/instance_helper.rb b/app/helpers/instance_helper.rb
@@ -2,7 +2,7 @@
module InstanceHelper
def site_title
- Setting.site_title.presence || site_hostname
+ Setting.site_title
end
def site_hostname
diff --git a/spec/helpers/instance_helper_spec.rb b/spec/helpers/instance_helper_spec.rb
@@ -15,12 +15,6 @@ describe InstanceHelper do
expect(helper.site_title).to eq 'New site title'
end
-
- it 'returns empty string when Setting.site_title is nil' do
- Setting.site_title = nil
-
- expect(helper.site_title).to eq 'cb6e6126.ngrok.io'
- end
end
describe 'site_hostname' do