+ let :facts do
+ {
+ :lsbdistrelease => '11.04',
+ :lsbdistcodename => 'natty',
+ :operatingsystem => 'Ubuntu',
+ :osfamily => 'Debian',
+ :lsbdistid => 'Ubuntu',
+ :puppetversion => Puppet.version,
+ }
+ end
+
+ let(:title) { 'ppa:needs/such.substitution/wow+type' }
+ it { is_expected.to_not contain_package('python-software-properties') }
+ it { is_expected.to contain_exec('add-apt-repository-ppa:needs/such.substitution/wow+type').that_notifies('Class[Apt::Update]').with({
+ :environment => [],
+ :command => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow+type',
+ :unless => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow_type-natty.list',
+ :user => 'root',
+ :logoutput => 'on_failure',
+ })
+ }
+ end
+
+ describe 'Ubuntu 15.10 sources.list filename' do
+ let :facts do
+ {
+ :lsbdistrelease => '15.10',
+ :lsbdistcodename => 'wily',
+ :operatingsystem => 'Ubuntu',
+ :osfamily => 'Debian',
+ :lsbdistid => 'Ubuntu',
+ :puppetversion => Puppet.version,
+ }
+ end
+
+ let(:title) { 'ppa:user/foo' }
+ it { is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with({
+ :environment => [],
+ :command => '/usr/bin/add-apt-repository -y ppa:user/foo',
+ :unless => '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-wily.list',
+ :user => 'root',
+ :logoutput => 'on_failure',
+ })
+ }
+ end
+
+ describe 'ppa depending on ppa, MODULES-1156' do