(GH-iac-334) Remove code specific to unsupported OSs
[puppet-modules/puppetlabs-apt.git] / spec / defines / conf_spec.rb
index d79cb22921571ef2af8011a9b3f37dc2009e91f5..f1e42b5f674571213aeb3872c56972b2e1846ad6 100644 (file)
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'spec_helper'
 describe 'apt::conf', type: :define do
   let :pre_condition do
@@ -5,11 +7,18 @@ describe 'apt::conf', type: :define do
   end
   let(:facts) do
     {
-      os: { family: 'Debian', name: 'Debian', release: { major: '7', full: '7.0' } },
-      lsbdistid: 'Debian',
-      osfamily: 'Debian',
-      lsbdistcodename: 'wheezy',
-      puppetversion: Puppet.version,
+      os: {
+        family: 'Debian',
+        name: 'Debian',
+        release: {
+          major: '9',
+          full: '9.0',
+        },
+        distro: {
+          codename: 'stretch',
+          id: 'Debian',
+        },
+      },
     }
   end
   let :title do
@@ -35,8 +44,7 @@ describe 'apt::conf', type: :define do
       is_expected.to contain_file(filename).with('ensure' => 'present',
                                                  'content'   => %r{Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;},
                                                  'owner'     => 'root',
-                                                 'group'     => 'root',
-                                                 'mode'      => '0644')
+                                                 'group'     => 'root')
     }
 
     context 'with notify_update = true (default)' do
@@ -83,8 +91,7 @@ describe 'apt::conf', type: :define do
     it {
       is_expected.to contain_file(filename).with('ensure' => 'absent',
                                                  'owner'     => 'root',
-                                                 'group'     => 'root',
-                                                 'mode'      => '0644')
+                                                 'group'     => 'root')
     }
   end
 end