File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 139
139
140
140
if $release =~ Pattern[/\/$/] {
141
141
$_components = $_release
142
+ } elsif $repos =~ Array {
143
+ $_components = join([$_release] + $repos , ' ' )
142
144
} else {
143
145
$_components = " ${_release} ${repos} "
144
146
}
Original file line number Diff line number Diff line change 36
36
it {
37
37
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 } )
38
38
}
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
39
57
end
40
58
end
41
59
You can’t perform that action at this time.
0 commit comments