X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fsource_spec.rb;h=641089568ed7ffc008e3e812da40d03a5811e023;hb=83082c088e6a6703a08071fbd5af0297beae62b9;hp=d702f62b74f94f076d97167f851968ce70b314a7;hpb=0e0005cedd13e44882ef569ec668546cb8620b28;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/source_spec.rb b/spec/defines/source_spec.rb index d702f62..6410895 100644 --- a/spec/defines/source_spec.rb +++ b/spec/defines/source_spec.rb @@ -171,6 +171,32 @@ describe 'apt::source' do } end + context 'with check_valid_until false' do + let :params do + { + location: 'hello.there', + check_valid_until: false, + } + end + + it { + is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# my_source\ndeb \[check-valid-until=false\] hello.there stretch main\n}) + } + end + + context 'with check_valid_until true' do + let :params do + { + location: 'hello.there', + check_valid_until: true, + } + end + + it { + is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# my_source\ndeb hello.there stretch main\n}) + } + end + context 'with keyring set' do let :params do {