diff options
author | varac <varacanero@zeromail.org> | 2015-12-07 19:44:14 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2015-12-07 21:54:49 +0100 |
commit | 2c656517bd463f23996f50c2e49503909df06173 (patch) | |
tree | c41b4570792901b51e1f5277b36ec3216c741bb2 | |
parent | 5381cb7b617a78b75b593a21fe9e0e8356013f6a (diff) | |
download | puppet-apt-2c656517bd463f23996f50c2e49503909df06173.tar.gz puppet-apt-2c656517bd463f23996f50c2e49503909df06173.tar.bz2 |
[rspec] extend test for custom facts
-rw-r--r-- | spec/unit/custom_facts_spec.rb | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/spec/unit/custom_facts_spec.rb b/spec/unit/custom_facts_spec.rb index 2d36bd7..9a28d92 100644 --- a/spec/unit/custom_facts_spec.rb +++ b/spec/unit/custom_facts_spec.rb @@ -21,6 +21,14 @@ describe "Facter::Util::Fact" do it "debian_codename = wheezy" do expect(Facter.fact(:debian_codename).value).to eq('wheezy') end + + it "debian_nextcodename = jessie" do + expect(Facter.fact(:debian_nextcodename).value).to eq('jessie') + end + + it "debian_nextrelease = stable" do + expect(Facter.fact(:debian_nextrelease).value).to eq('stable') + end end context 'Debian 8' do @@ -37,20 +45,31 @@ describe "Facter::Util::Fact" do it "debian_codename = jessie" do expect(Facter.fact(:debian_codename).value).to eq('jessie') end + + it "debian_nextcodename = stretch" do + expect(Facter.fact(:debian_nextcodename).value).to eq('stretch') + end + + it "debian_nextrelease = testing" do + expect(Facter.fact(:debian_nextrelease).value).to eq('testing') + end end context 'Ubuntu 15.10' do before do Facter.fact(:operatingsystem).stubs(:value).returns("Ubuntu") Facter.fact(:operatingsystemrelease).stubs(:value).returns("15.10") - Facter.fact(:lsbdistcodename).stubs(:value).returns("Vivid") + Facter.fact(:lsbdistcodename).stubs(:value).returns("wily") end - it "ubuntu_codename = Vivid" do - expect(Facter.fact(:ubuntu_codename).value).to eq('Vivid') + it "ubuntu_codename = wily" do + expect(Facter.fact(:ubuntu_codename).value).to eq('wily') end - end + it "ubuntu_nextcodename = xenial" do + expect(Facter.fact(:ubuntu_nextcodename).value).to eq('xenial') + end + end end describe "Test 'apt_running' fact" do |