+ context 'trusted_source true' do
+ let :facts do
+ {
+ :lsbdistid => 'Debian',
+ :lsbdistcodename => 'wheezy',
+ :osfamily => 'Debian'
+ }
+ end
+ let :params do
+ {
+ 'include_src' => false,
+ 'trusted_source' => true,
+ }
+ end
+
+ it { is_expected.to contain_apt__setting('list-my_source').that_notifies('Exec[apt_update]').with({
+ 'ensure' => 'present',
+ }).with_content(/# my_source\ndeb \[trusted=yes\] wheezy main\n/)
+ }
+ end
+
+ context 'architecture equals x86_64' do
+ let :facts do
+ {
+ :lsbdistid => 'Debian',
+ :lsbdistcodename => 'wheezy',
+ :osfamily => 'Debian'
+ }
+ end
+ let :params do
+ {
+ 'include_deb' => false,
+ 'include_src' => true,
+ 'architecture' => 'x86_64',
+ }
+ end
+
+ it { is_expected.to contain_apt__setting('list-my_source').that_notifies('Exec[apt_update]').with({
+ 'ensure' => 'present',
+ }).with_content(/# my_source\ndeb-src \[arch=x86_64 \] wheezy main\n/)
+ }
+ end
+