Test added to make sure when release is set to an empty string the
source file is rendered correctly.
$_before = Apt::Setting["list-${title}"]
- if ! $release {
+ if !$release {
if $facts['lsbdistcodename'] {
$_release = $facts['lsbdistcodename']
} else {
end
end
+ context 'release is empty string' do
+ let :facts do
+ {
+ :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
+ :lsbdistid => 'Debian',
+ :osfamily => 'Debian',
+ :puppetversion => Puppet.version,
+ }
+ end
+ let(:params) { { :location => 'hello.there', :release => '' } }
+
+ it { is_expected.to contain_apt__setting('list-my_source').with_content(/hello\.there main/) }
+ end
+
context 'invalid pin' do
let :facts do
{