Add the FrozenStrings magic comment
[puppet-modules/puppetlabs-apt.git] / spec / defines / key_spec.rb
index 94d40cb1a0250623b0bc071402c6a4b1c6d055a3..14ea231230f87ff7e704206f85259c8da7f43ab4 100644 (file)
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'spec_helper'
 
 GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'.freeze
@@ -392,5 +394,17 @@ describe 'apt::key' do
         is_expected.to contain_apt_key(title).with_server('keyserver.example.com')
       end
     end
+
+    context 'when setting key_options on the apt class' do
+      let :pre_condition do
+        'class { "apt":
+          key_options => "http-proxy=http://proxy.example.com:8080",
+        }'
+      end
+
+      it 'uses default keyserver' do
+        is_expected.to contain_apt_key(title).with_options('http-proxy=http://proxy.example.com:8080')
+      end
+    end
   end
 end