puppet-httpd/spec/classes/ssl_spec.rb
Reid Vandewiele e62e3625b4 Fix broken tests for ssl, vhost, vhost::*
A number of tests were broken by the last few style commits when '755'
became '0755' and the tests didn't get updated. This commit fixes the
tests so that they work again.

The tests for apache::ssl were broken because the 'operatingsystem' fact
was not being set in the tests. Don't know how long that's been busted,
but in any case this commit fixes that problem as well by adding
appropriate let(:facts).
2012-04-22 00:32:09 -07:00

37 lines
878 B
Ruby

require 'spec_helper'
describe 'apache::ssl', :type => :class do
describe 'when running on an unsupported OS' do
let(:facts) { {:operatingsystem => 'MagicUnicorn'} }
it {
expect {
should raise_error(Puppet::Error, /not defined in apache::ssl/ )
}
}
end
describe 'when running on a supported OS' do
let(:facts) { {:operatingsystem => 'redhat'} }
it { should include_class('apache') }
it { should include_class('apache::params') }
end
describe 'when running on redhat' do
let(:facts) { {:operatingsystem => 'redhat'} }
it {
should contain_package('apache_ssl_package').with(
'ensure' => 'installed'
)
}
end
describe 'when running on debian' do
let(:facts) { {:operatingsystem => 'debian'} }
it {
should contain_a2mod('ssl').with('ensure' => 'present')
}
end
end