X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Facceptance%2Fpin_spec.rb;h=07fc6073022d84198b544c6dbd66bc61a74943d2;hb=ec077973999ee46e993954a747cc36b88769fab3;hp=b5a004429b72ae2429f708ed1e95277d30e97e6c;hpb=ec3ddbe3727b3b3babdd8e1c6d7d32f3eeb21e08;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/acceptance/pin_spec.rb b/spec/acceptance/pin_spec.rb index b5a0044..07fc607 100644 --- a/spec/acceptance/pin_spec.rb +++ b/spec/acceptance/pin_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper_acceptance' -describe 'apt::pin define' do +describe 'apt::pin define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do context 'defaults' do it 'should work with no errors' do pp = <<-EOS @@ -91,6 +91,26 @@ describe 'apt::pin define' do it { should contain 'Pin: release a=vim-puppet' } end end + + context 'array' do + it 'should work with no errors' do + pp = <<-EOS + include apt + apt::pin { 'array': + ensure => present, + packages => ['apache', 'ntop'], + } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/preferences.d/array.pref') do + it { should be_file } + it { should contain 'Package: apache ntop' } + it { should contain 'Pin: release a=array' } + end + end end context 'release' do @@ -130,7 +150,7 @@ describe 'apt::pin define' do describe file('/etc/apt/preferences.d/vim-puppet.pref') do it { should be_file } - it { should contain 'Pin: origin "testrelease"' } + it { should contain 'Pin: origin testrelease' } end end end