aboutsummaryrefslogtreecommitdiffstats
path: root/spec/helpers/health_checks_helper_spec.rb
blob: 9418864b5d5486dc8a4445cf0ae0f1390097bf59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe HealthChecksHelper do
    include HealthChecksHelper

    describe :check_status do

        it 'warns that the check is failing' do
            check = double(:message => 'Failed', :ok? => false)
            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