2015-04-16 18:04:30 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'nslcd' do
|
|
|
|
|
2015-11-20 13:35:49 -05:00
|
|
|
{'RedHat' => 'Debian', 'Ubuntu' => 'Debian', 'Debian' => 'Debian'}.each do |system, family|
|
2015-04-16 18:04:30 -04:00
|
|
|
context "when on system #{system}" do
|
|
|
|
let :facts do
|
|
|
|
{
|
|
|
|
:osfamily => family,
|
|
|
|
:operatingsystem => system,
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
it { should contain_class('nslcd') }
|
|
|
|
it { should contain_class('nslcd::install') }
|
|
|
|
it { should contain_class('nslcd::config') }
|
|
|
|
it { should contain_class('nslcd::service') }
|
|
|
|
|
|
|
|
it {
|
|
|
|
should contain_package('nslcd')
|
|
|
|
should contain_service('nslcd')
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'when on an unknown system' do
|
|
|
|
it { expect { should raise_error(Puppet::Error) } }
|
|
|
|
end
|
|
|
|
end
|