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 281eec8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/classes/letsencrypt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@
it { is_expected.to contain_file('/foo/bar/baz').with(ensure: 'directory') }
end

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

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

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

Expand Down

0 comments on commit 281eec8

Please sign in to comment.