Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Puppet 4 language update
[puppet-modules/puppetlabs-apt.git]
/
spec
/
defines
/
key_spec.rb
diff --git
a/spec/defines/key_spec.rb
b/spec/defines/key_spec.rb
index d4a85a4150e1bd8559931377e2f80a9bdc4d5698..a7334d8115e2973b936940c2c908a9cd275ceb1e 100644
(file)
--- a/
spec/defines/key_spec.rb
+++ b/
spec/defines/key_spec.rb
@@
-7,7
+7,7
@@
describe 'apt::key' do
let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } }
let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => Puppet.version, } }
- GPG_KEY_ID = '
47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30
'
+ GPG_KEY_ID = '
6F6B15509CF8E59E6E469F327F438280EF8D349F
'
let :title do
GPG_KEY_ID
let :title do
GPG_KEY_ID
@@
-245,7
+245,7
@@
describe 'apt::key' do
:content => [],
} end
it 'fails' do
:content => [],
} end
it 'fails' do
- expect { subject.call }.to raise_error(/
is not a string
/)
+ expect { subject.call }.to raise_error(/
expects a String value
/)
end
end
end
end
@@
-263,18
+263,20
@@
describe 'apt::key' do
:options => {},
} end
it 'fails' do
:options => {},
} end
it 'fails' do
- expect { subject.call }.to raise_error(/
is not a string
/)
+ expect { subject.call }.to raise_error(/
expects a String value
/)
end
end
context 'invalid ensure' do
end
end
context 'invalid ensure' do
- let :params do
- {
- :ensure => 'foo',
- }
- end
- it 'fails' do
- expect { subject.call }.to raise_error(/does not match/)
+ %w(foo aabsent absenta apresent presenta).each do |param|
+ let :params do
+ {
+ :ensure => param,
+ }
+ end
+ it 'fails' do
+ expect { subject.call }.to raise_error(/for Enum\['absent', 'present'\], got/)
+ end
end
end
end
end