aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/health_checks_helper.rb2
-rw-r--r--spec/helpers/health_checks_helper_spec.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/helpers/health_checks_helper.rb b/app/helpers/health_checks_helper.rb
index f5769a9ba..f9e4d42df 100644
--- a/app/helpers/health_checks_helper.rb
+++ b/app/helpers/health_checks_helper.rb
@@ -1,7 +1,7 @@
module HealthChecksHelper
def check_status(check)
- style = check.ok? ? {} : "color: red"
+ style = check.ok? ? '' : 'color: red'
content_tag(:b, check.message, :style => style)
end
diff --git a/spec/helpers/health_checks_helper_spec.rb b/spec/helpers/health_checks_helper_spec.rb
index 7d4083da5..7dbfaf06e 100644
--- a/spec/helpers/health_checks_helper_spec.rb
+++ b/spec/helpers/health_checks_helper_spec.rb
@@ -10,6 +10,11 @@ describe HealthChecksHelper do
expect(check_status(check)).to include('red')
end
+ it 'sets style to a blank string if ok' do
+ check = double(:message => '', :ok? => true)
+ expect(check_status(check)).to include('style=""')
+ end
+
end
end