File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 139139
140140 if $release =~ Pattern[/\/$/] {
141141 $_components = $_release
142+ } elsif $repos =~ Array {
143+ $_components = join([$_release] + $repos , ' ' )
142144 } else {
143145 $_components = " ${_release} ${repos} "
144146 }
Original file line number Diff line number Diff line change 3636 it {
3737 expect ( subject ) . to contain_apt__setting ( 'list-my_source' ) . with ( ensure : 'present' ) . without_content ( %r{# my_source\n deb-src hello.there wheezy main\n } )
3838 }
39+
40+ context 'with repos' do
41+ context 'as empty array' do
42+ let ( :params ) { super ( ) . merge ( repos : [ ] ) }
43+
44+ it {
45+ expect ( subject ) . to contain_apt__setting ( 'list-my_source' ) . with ( ensure : 'present' ) . without_content ( %r{# my_source\n deb-src hello.there wheezy\n } )
46+ }
47+ end
48+
49+ context 'as non-empty array' do
50+ let ( :params ) { super ( ) . merge ( repos : [ 'main' , 'non-free' , 'contrib' ] ) }
51+
52+ it {
53+ expect ( subject ) . to contain_apt__setting ( 'list-my_source' ) . with ( ensure : 'present' ) . without_content ( %r{# my_source\n deb-src hello.there wheezy main non-free contrib\n } )
54+ }
55+ end
56+ end
3957 end
4058 end
4159
You can’t perform that action at this time.
0 commit comments