X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Facceptance%2Fpin_spec.rb;h=09a8d18ea1bf72521dd5169f8f2f110755123e30;hb=4d0bf7cbab1fc9c9fd0ff174315e69262cfe5f68;hp=b5a004429b72ae2429f708ed1e95277d30e97e6c;hpb=1ce7dbb4c3d4b52d85ec023fa8892a1340fdb665;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/acceptance/pin_spec.rb b/spec/acceptance/pin_spec.rb index b5a0044..09a8d18 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