X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Facceptance%2Fpin_spec.rb;h=07fc6073022d84198b544c6dbd66bc61a74943d2;hb=08043adb753210c12cbd704ea800898a17751ff6;hp=4011e73c10fbe9a62f1f1309ed28c42507c7c408;hpb=2b9eb2949aa70d002b300dfa53d0cdc2e9cbe698;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/acceptance/pin_spec.rb b/spec/acceptance/pin_spec.rb index 4011e73..07fc607 100644 --- a/spec/acceptance/pin_spec.rb +++ b/spec/acceptance/pin_spec.rb @@ -91,6 +91,26 @@ describe 'apt::pin define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfa 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', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfa 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