X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Funit%2Fpuppet%2Ftype%2Fapt_key_spec.rb;h=253b6448747f8c4d7dacde60edc2aa82eb84ab76;hb=6d0c3f5537345f27675f044a2181dcadce75fafb;hp=5b205e9924b3d749944b973a8c91cdd31a8d901e;hpb=9f2fd0cb6d191e7883a140fb160d8fefaa685a66;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/unit/puppet/type/apt_key_spec.rb b/spec/unit/puppet/type/apt_key_spec.rb index 5b205e9..253b644 100644 --- a/spec/unit/puppet/type/apt_key_spec.rb +++ b/spec/unit/puppet/type/apt_key_spec.rb @@ -32,6 +32,10 @@ describe Puppet::Type.type(:apt_key) do it 'refresh is not set' do expect(resource[:refresh]).to eq nil end + + it 'weak_ssl is not set' do + expect(resource[:weak_ssl]).to eq nil + end end context 'with a lowercase 32bit key id' do @@ -107,6 +111,20 @@ describe Puppet::Type.type(:apt_key) do end end + context 'with source and weak_ssl' do + let(:resource) do + Puppet::Type.type(:apt_key).new( + id: 'EF8D349F', + source: 'https://apt.puppetlabs.com/pubkey.gpg', + weak_ssl: true, + ) + end + + it 'source is set to the URL' do + expect(resource[:source]).to eq 'https://apt.puppetlabs.com/pubkey.gpg' + end + end + context 'with content' do let(:resource) do Puppet::Type.type(:apt_key).new(