diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-12-03 09:22:41 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-12-03 09:22:41 +0000 |
commit | 7414ed478f212be2b48c95fafde15726b348b197 (patch) | |
tree | 1d89b90f604b837b097fb4274775c4f3b3a319d6 /spec/controllers/health_checks_controller_spec.rb | |
parent | 479c9cd4567e2042d00c347f25a411373a6b1df9 (diff) | |
parent | d05082c1cf1ddec789e547b54943f6e7d5bdffc1 (diff) |
Merge branch 'release/0.20'0.20.0.0
Conflicts:
config/general.yml-example
Diffstat (limited to 'spec/controllers/health_checks_controller_spec.rb')
-rw-r--r-- | spec/controllers/health_checks_controller_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/controllers/health_checks_controller_spec.rb b/spec/controllers/health_checks_controller_spec.rb new file mode 100644 index 000000000..f7ad6d6a4 --- /dev/null +++ b/spec/controllers/health_checks_controller_spec.rb @@ -0,0 +1,30 @@ +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe HealthChecksController do + + describe :index do + + describe :index do + + it 'returns a 200 if all health checks pass' do + HealthChecks.stub(:ok? => true) + get :index + expect(response.status).to eq(200) + end + + it 'returns a 500 if the health check fails' do + HealthChecks.stub(:ok? => false) + get :index + expect(response.status).to eq(500) + end + + it 'does not render a layout' do + get :index + expect(response).to render_template(:layout => false) + end + + end + + end + +end |