summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/helpers/version_check_helper.rb2
-rw-r--r--app/views/help/index.html.haml3
-rw-r--r--spec/views/help/index.html.haml_spec.rb3
3 files changed, 3 insertions, 5 deletions
diff --git a/app/helpers/version_check_helper.rb b/app/helpers/version_check_helper.rb
index f64d730b448..a674564c4ec 100644
--- a/app/helpers/version_check_helper.rb
+++ b/app/helpers/version_check_helper.rb
@@ -1,6 +1,6 @@
module VersionCheckHelper
def version_status_badge
- if Rails.env.production?
+ if Rails.env.production? && current_application_settings.version_check_enabled
image_tag VersionCheck.new.url
end
end
diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml
index abffabfc41d..2333e6fdf1d 100644
--- a/app/views/help/index.html.haml
+++ b/app/views/help/index.html.haml
@@ -5,8 +5,7 @@
- if current_user && current_user.admin?
%span= Gitlab::VERSION
%small= Gitlab::REVISION
- - if current_application_settings.version_check_enabled
- = version_status_badge
+ = version_status_badge
%p.slead
GitLab is open source software to collaborate on code.
%br
diff --git a/spec/views/help/index.html.haml_spec.rb b/spec/views/help/index.html.haml_spec.rb
index 4fd561428f6..91cf4cb98c0 100644
--- a/spec/views/help/index.html.haml_spec.rb
+++ b/spec/views/help/index.html.haml_spec.rb
@@ -49,7 +49,6 @@ describe 'help/index' do
def stub_helpers
allow(view).to receive(:markdown).and_return('')
- allow(view).to receive(:current_application_settings).
- and_return(double.as_null_object)
+ allow(view).to receive(:version_status_badge).and_return('')
end
end