module-puppetdb/spec/unit/classes/master/report_processor_spec.rb
Garrett Honeycutt 02a9cf0da4 Support rspec-puppet v1.0.0
include_class has been replaced with contain_class.
http://bombasticmonkey.com/2013/12/05/rspec-puppet-1.0.0/
2013-12-27 17:34:14 -05:00

44 lines
1.3 KiB
Ruby

require 'spec_helper'
describe 'puppetdb::master::report_processor', :type => :class do
context 'on a supported platform' do
let(:facts) do
{
:osfamily => 'RedHat',
:clientcert => 'test.domain.local',
}
end
it { should contain_class('puppetdb::master::report_processor') }
describe 'when using default values' do
it { should contain_ini_subsetting('puppet.conf/reports/puppetdb').
with(
'ensure' => 'absent',
'path' => '/etc/puppet/puppet.conf',
'section' => 'master',
'setting' => 'reports',
'subsetting' => 'puppetdb',
'subsetting_separator' => ','
)}
end
describe 'when enabling reports' do
let(:params) do
{
'enable' => true
}
end
it { should contain_ini_subsetting('puppet.conf/reports/puppetdb').
with(
'ensure' => 'present',
'path' => '/etc/puppet/puppet.conf',
'section' => 'master',
'setting' => 'reports',
'subsetting' => 'puppetdb',
'subsetting_separator' => ','
)}
end
end
end