Skip to content

Commit

Permalink
test list of certificates as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
nod0n committed Jan 5, 2022
1 parent c506023 commit 29550e9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/classes/letsencrypt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@
it { is_expected.to contain_file('/foo/bar/baz').with(ensure: 'directory') }
end

describe 'with list of certificates' do
let(:additional_params) do
{ certificates: {
'foo' => { 'domains' => %w[lth0edae4nzfq895 nsgqqm4mbw257t9i] },
'a' => { 'environment' => %w[ABC=y9jby5nmfgmstnbk DFE=y00lt0fh1vj2amjx] }
} }
end

it { is_expected.to contain_letsencrypt__certonly('foo').with_domains(%w[lth0edae4nzfq895 nsgqqm4mbw257t9i]) }
it { is_expected.to contain_letsencrypt__certonly('a').with_environment(%w[ABC=y9jby5nmfgmstnbk DFE=y00lt0fh1vj2amjx]) }
end

context 'when not agreeing to the TOS' do
let(:params) { { agree_tos: false } }

Expand Down

0 comments on commit 29550e9

Please sign in to comment.