Merge pull request #418 from cmurphy/rspec
[puppet-modules/puppetlabs-apt.git] / spec / unit / puppet / type / apt_key_spec.rb
index 57aeb863f862c26fd90f8356012495a20c687edb..e8a5462c6f3e91c002a208883fd4f3116344c66b 100644 (file)
@@ -163,5 +163,19 @@ describe Puppet::Type::type(:apt_key) do
         :source  => '/path/to/a/file'
       )}.to_not raise_error
     end
+
+    it 'allows 5-digit ports' do
+      expect { Puppet::Type.type(:apt_key).new(
+        :id      => '4BD6EC30',
+        :source  => 'http://pgp.mit.edu:12345/key'
+      )}.to_not raise_error
+    end
+
+    it 'allows 5-digit ports when using key servers' do
+      expect { Puppet::Type.type(:apt_key).new(
+        :id      => '4BD6EC30',
+        :server  => 'http://pgp.mit.edu:12345'
+      )}.to_not raise_error
+    end
   end
 end