|
102 | 102 | expect(described_class.new(jks)[:name]).to eq(jks_resource[:name])
|
103 | 103 | end
|
104 | 104 |
|
105 |
| - it 'has false as the default value to :trustcacerts when parameter not provided' do |
106 |
| - expect(described_class.new(jks_resource)[:trustcacerts]).to be_nil |
| 105 | + it 'resource[:trustcacerts] is falsey when parameter not provided' do |
| 106 | + expect(described_class.new(jks_resource)[:trustcacerts]).to be_falsey |
| 107 | + end |
| 108 | + |
| 109 | + it 'resource[:trustcacerts] is the boolean `false` when set to `false`' do |
| 110 | + jks = jks_resource.dup |
| 111 | + jks[:trustcacerts] = false |
| 112 | + |
| 113 | + expect(described_class.new(jks)[:trustcacerts]).to be false |
| 114 | + end |
| 115 | + |
| 116 | + it 'resource[:trustcacerts] is the boolean `true` when set to `true`' do |
| 117 | + jks = jks_resource.dup |
| 118 | + jks[:trustcacerts] = true |
| 119 | + |
| 120 | + expect(described_class.new(jks)[:trustcacerts]).to be true |
107 | 121 | end
|
108 | 122 |
|
109 | 123 | it 'has :rsa as the default value for :private_key_type' do
|
|
175 | 189 | }.to raise_error(Puppet::Error, %r{length 6})
|
176 | 190 | end
|
177 | 191 |
|
178 |
| - it 'has :false value to :password_fail_reset when parameter not provided' do |
179 |
| - expect(described_class.new(jks_resource)[:password_fail_reset]).to be_nil |
| 192 | + it 'resource[:password_fail_reset] is falsey when parameter not provided' do |
| 193 | + expect(described_class.new(jks_resource)[:password_fail_reset]).to be_falsey |
| 194 | + end |
| 195 | + |
| 196 | + it 'resource[:password_fail_reset] is the boolean `false` when parameter set to `false`' do |
| 197 | + jks = jks_resource.dup |
| 198 | + jks[:password_fail_reset] = false |
| 199 | + |
| 200 | + expect(described_class.new(jks)[:password_fail_reset]).to be false |
| 201 | + end |
| 202 | + |
| 203 | + it 'resource[:password_fail_reset] is the boolean `true` when parameter set to `true`' do |
| 204 | + jks = jks_resource.dup |
| 205 | + jks[:password_fail_reset] = true |
| 206 | + |
| 207 | + expect(described_class.new(jks)[:password_fail_reset]).to be true |
180 | 208 | end
|
181 | 209 |
|
182 | 210 | it 'fails if :source_password is not provided for pkcs12 :storetype' do
|
|
0 commit comments