X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fsource_spec.rb;h=641089568ed7ffc008e3e812da40d03a5811e023;hb=3d3620ccd767ca8c4055f1c84a658c79de31fcb3;hp=d702f62b74f94f076d97167f851968ce70b314a7;hpb=32eec3baf6171d4f4aeb513f4e481f82a8a92338;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 {