Merge pull request #466 from paroga/master
[puppet-modules/puppetlabs-apt.git] / spec / classes / backports_spec.rb
index 18f6337aefda1ca5bd1b30682011de5058f41fa2..721a4a613c53d0f93f0fcddc0ee893453c873e8d 100644 (file)
@@ -17,9 +17,14 @@ describe 'apt::backports', :type => :class do
           'location'   => 'http://old-releases.ubuntu.com/ubuntu',
           'release'    => 'karmic-backports',
           'repos'      => 'main universe multiverse restricted',
-          'key'        => '437D05B5',
+          'key'        => '630239CC130E1A7FD81A27B140976EAF437D05B5',
           'key_server' => 'pgp.mit.edu',
-          'pin'        => 500,
+        })
+      }
+
+      it { should contain_apt__pin('backports').with({
+          'release'  => 'karmic-backports',
+          'priority' => 500,
         })
       }
     end
@@ -46,9 +51,14 @@ describe 'apt::backports', :type => :class do
         'location'   => 'http://old-releases.ubuntu.com/ubuntu',
         'release'    => 'karmic-backports',
         'repos'      => 'main universe multiverse restricted',
-        'key'        => '437D05B5',
+        'key'        => '630239CC130E1A7FD81A27B140976EAF437D05B5',
         'key_server' => 'pgp.mit.edu',
-        'pin'        => 200,
+      })
+    }
+
+    it { should contain_apt__pin('backports').with({
+        'release'  => 'karmic-backports',
+        'priority' => 200,
       })
     }
   end
@@ -67,9 +77,14 @@ describe 'apt::backports', :type => :class do
         'location'   => 'http://backports.debian.org/debian-backports',
         'release'    => 'squeeze-backports',
         'repos'      => 'main contrib non-free',
-        'key'        => '46925553',
+        'key'        => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
         'key_server' => 'pgp.mit.edu',
-        'pin'        => 200,
+      })
+    }
+
+    it { should contain_apt__pin('backports').with({
+        'release'  => 'squeeze-backports',
+        'priority' => 200,
       })
     }
   end
@@ -88,9 +103,14 @@ describe 'apt::backports', :type => :class do
         'location'   => 'http://ftp.debian.org/debian/',
         'release'    => 'wheezy-backports',
         'repos'      => 'main contrib non-free',
-        'key'        => '46925553',
+        'key'        => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
         'key_server' => 'pgp.mit.edu',
-        'pin'        => 200,
+      })
+    }
+
+    it { should contain_apt__pin('backports').with({
+        'release'  => 'wheezy-backports',
+        'priority' => 200,
       })
     }
   end
@@ -109,9 +129,14 @@ describe 'apt::backports', :type => :class do
         'location'   => 'http://us.archive.ubuntu.com/ubuntu',
         'release'    => 'trusty-backports',
         'repos'      => 'main universe multiverse restricted',
-        'key'        => '437D05B5',
+        'key'        => '630239CC130E1A7FD81A27B140976EAF437D05B5',
         'key_server' => 'pgp.mit.edu',
-        'pin'        => 200,
+      })
+    }
+
+    it { should contain_apt__pin('backports').with({
+        'release'  => 'trusty-backports',
+        'priority' => 200,
       })
     }
   end
@@ -138,9 +163,14 @@ describe 'apt::backports', :type => :class do
         'location'   => location,
         'release'    => 'squeeze-backports',
         'repos'      => 'main contrib non-free',
-        'key'        => '46925553',
+        'key'        => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
         'key_server' => 'pgp.mit.edu',
-        'pin'        => 200,
+      })
+    }
+
+    it { should contain_apt__pin('backports').with({
+        'release'  => 'squeeze-backports',
+        'priority' => 200,
       })
     }
   end