Преглед изворни кода

Fix tests to pass

- NB: Currently, we do not test for the inclusion of the
openldap::utils class when the provider is 'olc'.
DarkMorford пре 6 година
родитељ
комит
404c28fb2e
1 измењених фајлова са 9 додато и 1 уклоњено
  1. 9 1
      spec/classes/server/install_spec.rb

+ 9 - 1
spec/classes/server/install_spec.rb

@@ -4,8 +4,16 @@ describe 'openldap::server::install' do
   on_supported_os.each do |os, os_facts|
     context "on #{os}" do
       let(:facts) { os_facts }
+      let(:pre_condition) { "class {'openldap::server':}" }
 
-      it { is_expected.to compile }
+      it { is_expected.to compile.with_all_deps }
+
+      case os_facts[:osfamily]
+      when 'Debian'
+        it { is_expected.to contain_file('/var/cache/debconf/slapd.preseed') }
+      else
+        it { is_expected.not_to contain_file('/var/cache/debconf/slapd.preseed') }
+      end
     end
   end
 end