aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/health_checks_controller_spec.rb
blob: f7ad6d6a42ee03f7b31314a28d279bd55dda2a02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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