X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fkey_spec.rb;h=334924d2b7ce1fdcbf468dc2d1d30f18ae386881;hb=e014fc04ed8358e4f7c2e87f7434df9817a4c7bb;hp=14a3efbc5aadbfeb8527c48b858ca4b39b6f3848;hpb=5476d9033bfee6807800b1d14c8bbb9da4b4c01c;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/key_spec.rb b/spec/defines/key_spec.rb index 14a3efb..334924d 100644 --- a/spec/defines/key_spec.rb +++ b/spec/defines/key_spec.rb @@ -5,9 +5,15 @@ describe 'apt::key' do 'class { "apt": }' end - let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } } + let(:facts) { { + :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, + :lsbdistid => 'Debian', + :osfamily => 'Debian', + :lsbdistcodename => 'wheezy', + :puppetversion => Puppet.version, + } } - GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30' + GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F' let :title do GPG_KEY_ID @@ -245,7 +251,7 @@ describe 'apt::key' do :content => [], } end it 'fails' do - expect { subject.call }.to raise_error(/is not a string/) + expect { subject.call }.to raise_error(/expects a/) end end @@ -263,7 +269,7 @@ describe 'apt::key' do :options => {}, } end it 'fails' do - expect { subject.call }.to raise_error(/is not a string/) + expect { subject.call }.to raise_error(/expects a/) end end @@ -275,7 +281,7 @@ describe 'apt::key' do } end it 'fails' do - expect { subject.call }.to raise_error(/does not match/) + expect { subject.call }.to raise_error(/for Enum\['absent', 'present'\], got/) end end end