X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Funit%2Fpuppet%2Ftype%2Fapt_key_spec.rb;h=5b205e9924b3d749944b973a8c91cdd31a8d901e;hb=9f2fd0cb6d191e7883a140fb160d8fefaa685a66;hp=a25d8271e31886ac67c990295ae4189598130ef0;hpb=7a52dc6237285c6d9d5e39a6f3f50ee8cba437b7;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 a25d827..5b205e9 100644 --- a/spec/unit/puppet/type/apt_key_spec.rb +++ b/spec/unit/puppet/type/apt_key_spec.rb @@ -28,6 +28,10 @@ describe Puppet::Type.type(:apt_key) do it 'content is not set' do expect(resource[:content]).to eq nil end + + it 'refresh is not set' do + expect(resource[:refresh]).to eq nil + end end context 'with a lowercase 32bit key id' do @@ -138,6 +142,15 @@ describe Puppet::Type.type(:apt_key) do }.to raise_error(%r{content and source are mutually exclusive}) end + it 'raises an error if refresh => true and ensure => absent' do + expect { + Puppet::Type.type(:apt_key).new(id: 'EF8D349F', + source: 'http://apt.puppetlabs.com/pubkey.gpg', + ensure: :absent, + refresh: :true) + }.to raise_error(%r{ensure => absent and refresh => true are mutually exclusive}) + end + it 'raises an error if a weird length key is used' do expect { Puppet::Type.type(:apt_key).new(id: 'FEF8D349F',