Merge branch '1.4.x'
[puppet-modules/puppetlabs-apt.git] / spec / acceptance / pin_spec.rb
index b5a004429b72ae2429f708ed1e95277d30e97e6c..a38dfa4b2702d0e3e2af33b4e4e7acb35b2d4360 100644 (file)
@@ -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