Merge pull request #330 from dantman/master
[puppet-modules/puppetlabs-apt.git] / spec / acceptance / backports_spec.rb
index 6d3f7f0e68713dfbf7d0c682e3a25d1730f132db..78f21fd588a86ea13e343bc0709b08a69925fe21 100644 (file)
@@ -49,6 +49,20 @@ describe 'apt::backports class', :unless => UNSUPPORTED_PLATFORMS.include?(fact(
     end
   end
 
+  context 'pin_priority' do
+    it 'should work with no errors' do
+      pp = <<-EOS
+      class { 'apt::backports': pin_priority => 500, }
+      EOS
+
+      apply_manifest(pp, :catch_failures => true)
+    end
+    describe file('/etc/apt/preferences.d/backports.pref') do
+      it { should be_file }
+      it { should contain "Pin-Priority: 500" }
+    end
+  end
+
   context 'reset' do
     it 'deletes backport files' do
       shell('rm -rf /etc/apt/sources.list.d/backports.list')