Skip to content

Commit

Permalink
add spec tests for sensu_client_config custom options
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz committed Jun 20, 2013
1 parent a5804fe commit 640b756
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions spec/classes/sensu_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
'client_name' => 'host.domain.com',
'address' => '2.3.4.5',
'subscriptions' => [],
'ensure' => 'present'
'ensure' => 'present',
'custom' => {}
) }

end
Expand All @@ -21,15 +22,17 @@
:address => '1.2.3.4',
:subscriptions => ['all'],
:client_name => 'myclient',
:safe_mode => true
:safe_mode => true,
:custom => { 'foo' => 'bar', 'bool' => true }
} }

it { should contain_sensu_client_config('host.domain.com').with(
'client_name' => 'myclient',
'address' => '1.2.3.4',
'subscriptions' => ['all'],
'ensure' => 'present',
'safe_mode' => true
'safe_mode' => true,
'custom' => { 'foo' => 'bar', 'bool' => true }
) }

end
Expand All @@ -39,7 +42,7 @@
let(:params) { { :enabled => false } }
it { should contain_sensu_client_config('host.domain.com').with_ensure('absent') }
end

context 'purge_configs' do
let(:params) { { :purge_config => true } }

Expand Down

0 comments on commit 640b756

Please sign in to comment.