forked from dgolja/golja-gnupg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgnupg_init_spec.rb
More file actions
41 lines (35 loc) · 948 Bytes
/
gnupg_init_spec.rb
File metadata and controls
41 lines (35 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require 'spec_helper'
describe 'gnupg', type: :class do
['RedHat', 'Debian', 'Linux', 'Suse'].each do |system|
if system == 'Linux'
let(:facts) { { osfamily: 'Linux', operatingsystem: 'Amazon' } }
else
let(:facts) { { osfamily: system } }
end
it { is_expected.to contain_class('gnupg::install') }
describe "gnupg on system #{system}" do
context 'when enabled' do
let(:params) do
{
package_ensure: 'present',
package_name: 'gnupg',
}
end
it {
is_expected.to contain_package('gnupg').with('ensure' => 'present')
}
end
context 'when disabled' do
let(:params) do
{
package_ensure: 'absent',
package_name: 'gnupg',
}
end
it {
is_expected.to contain_package('gnupg').with('ensure' => 'absent')
}
end
end
end
end