X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Funit%2Fpuppet%2Ftype%2Fapt_key_spec.rb;h=b20a09a101b4499c89b8a4f0f32b8d353710b693;hb=c5259f83ad20d120d502d8541c75f4ee6021fec8;hp=5b205e9924b3d749944b973a8c91cdd31a8d901e;hpb=17b9a4481378fb50b5c3745824ae07ddbdd8e3fa;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..b20a09a 100644 --- a/spec/unit/puppet/type/apt_key_spec.rb +++ b/spec/unit/puppet/type/apt_key_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' require 'puppet' @@ -32,6 +34,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 +113,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(