apt::pin: Allow for packages to be an array.
[puppet-modules/puppetlabs-apt.git] / spec / defines / pin_spec.rb
index 7a58e78d1f18ef4fc6bd02e02a1576390f45e023..179a2f3ac5bcf48e7bfc80b67c54334f76da093b 100644 (file)
@@ -65,7 +65,7 @@ describe 'apt::pin', :type => :define do
     {
       :params => {
         :packages        => 'apache',
-        :priority        => '1',  
+        :priority        => '1',
         :release         => 'stable',
         :codename        => 'wheezy',
         :release_version => '3.0',
@@ -75,6 +75,12 @@ describe 'apt::pin', :type => :define do
       },
       :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=stable, n=wheezy, v=3.0, c=main, o=Debian, l=Debian\nPin-Priority: 1\n"
     },
+    {
+      :params => {
+        :packages        => ['apache', 'ntop'],
+      },
+      :content => "# my_pin\nExplanation: : my_pin\nPackage: apache ntop\nPin: release a=my_pin\nPin-Priority: 0\n"
+    },
   ].each do |param_set|
     describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do
       let :param_hash do