diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-04-20 09:29:43 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-04-20 09:29:43 +0100 |
commit | 5fce972f8d70ad036f35008c31511f32b10c87e1 (patch) | |
tree | 6b1fcabc2ab94797896028179b47d91fa8ed80ec | |
parent | 5b67028416beb954311ae6b7fd6852939c7dd8dc (diff) | |
parent | 30ac083e66c9ffe1d8de9f641b6a703c37fc0c49 (diff) |
Merge remote-tracking branch 'nzherald_github/tweak-health-check' into rails-3-develop
-rw-r--r-- | app/helpers/health_checks_helper.rb | 2 | ||||
-rw-r--r-- | spec/helpers/health_checks_helper_spec.rb | 5 |
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 |