1 require 'spec_helper_acceptance'
3 describe 'apt::backports class' do
5 it 'should work with no errors' do
7 class { 'apt::backports': }
10 apply_manifest(pp, :catch_failures => true)
15 it 'should work with no errors' do
17 class { 'apt::backports': release => 'precise' }
20 apply_manifest(pp, :catch_failures => true)
23 describe file('/etc/apt/sources.list.d/backports.list') do
25 it { should contain 'precise-backports main universe multiverse restricted' }
30 it 'should work with no errors' do
32 class { 'apt::backports': release => 'precise', location => 'http://localhost/ubuntu' }
35 apply_manifest(pp, :catch_failures => true)
38 describe file('/etc/apt/sources.list.d/backports.list') do
40 it { should contain 'deb http://localhost/ubuntu precise-backports main universe multiverse restricted' }
45 it 'deletes backport files' do
46 shell('rm -rf /etc/apt/sources.list.d/backports.list')
47 shell('rm -rf /etc/apt/preferences.d/backports.pref')