X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fclasses%2Fapt_backports_spec.rb;h=aae4bb0cc150d3c5c977d427c4e1573ed13a525c;hb=a06803d0417addcb4f5adbd59abc8bc7d427d181;hp=5c65b57fdc43c34d2973adfbaeb171280edf8835;hpb=b87e1af3704f5574bda393e36ded542ee7c4be23;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/classes/apt_backports_spec.rb b/spec/classes/apt_backports_spec.rb index 5c65b57..aae4bb0 100644 --- a/spec/classes/apt_backports_spec.rb +++ b/spec/classes/apt_backports_spec.rb @@ -65,6 +65,7 @@ describe 'apt::backports', :type => :class do context 'set everything' do let(:facts) do { + :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, :lsbdistid => 'Ubuntu', :osfamily => 'Debian', :lsbdistcodename => 'trusty', @@ -121,6 +122,7 @@ describe 'apt::backports', :type => :class do describe 'mint tests' do let(:facts) do { + :os => { :family => 'Debian', :name => 'Linuxmint', :release => { :major => '17', :full => '17' }}, :lsbdistid => 'linuxmint', :osfamily => 'Debian', :lsbdistcodename => 'qiana', @@ -205,6 +207,7 @@ describe 'apt::backports', :type => :class do describe 'validation' do let(:facts) do { + :os => { :family => 'Debian', :name => 'Ubuntu', :release => { :major => '14', :full => '14.04' }}, :lsbdistid => 'Ubuntu', :osfamily => 'Debian', :lsbdistcodename => 'trusty', @@ -221,7 +224,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /expects a String value/) + }.to raise_error(Puppet::Error, /expects a value of type Undef or String/) end end context 'invalid release' do @@ -233,7 +236,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /expects a String value/) + }.to raise_error(Puppet::Error, /expects a value of type Undef or String/) end end context 'invalid repos' do @@ -245,7 +248,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /expects a String value/) + }.to raise_error(Puppet::Error, /expects a value of type Undef or String/) end end context 'invalid key' do @@ -257,7 +260,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /expects a value of type String, Hash,/) + }.to raise_error(Puppet::Error, /expects a value of type Undef, String, or Hash, got Boolean/) end end context 'invalid pin' do @@ -269,7 +272,7 @@ describe 'apt::backports', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /parameter 'pin' expects a value of type Integer, Pattern/) + }.to raise_error(Puppet::Error, /expects a value of type Undef, Integer, String, or Hash, got Boolean/) end end end