Skip to content

Commit

Permalink
Merge pull request voxpupuli#1214 from bastelfreak/tests
Browse files Browse the repository at this point in the history
increase spec test coverage
  • Loading branch information
bastelfreak authored May 11, 2018
2 parents 7918ecc + eef5216 commit 4228fa1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,24 @@
it { is_expected.to contain_yumrepo('passenger').that_comes_before('Package[nginx]') }
end

context 'using default repo without passenger' do
let(:params) { { purge_passenger_repo: false } }

it { is_expected.to contain_package('nginx') }
it do
is_expected.to contain_yumrepo('nginx-release').with(
'baseurl' => "http://nginx.org/packages/#{facts[:operatingsystem] == 'CentOS' ? 'centos' : 'rhel'}/#{facts[:operatingsystemmajrelease]}/$basearch/",
'descr' => 'nginx repo',
'enabled' => '1',
'gpgcheck' => '1',
'priority' => '1',
'gpgkey' => 'http://nginx.org/keys/nginx_signing.key'
)
end

it { is_expected.not_to contain_yumrepo('passenger') }
end

context 'package_source => nginx-mainline' do
let(:params) { { package_source: 'nginx-mainline' } }

Expand Down

0 comments on commit 4228fa1

Please sign in to comment.